Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Using an image as a link
February 12, 2006, 4:34 am
rate this thread
post in this forum, here the first of many questions.
I want to be able to use an image as a link. So in html I would use:
<a href="http://www.somepage.com ">
I have written the php code below (which I am proud of !!):
// Switch statement based off server time
switch (date('H i D'))
case '22 33 Sat':
print '<img src="michelle.jpg" border="2" height="170"
case '22 34 Sat':
print '<img src="sunset.jpg" border="2" height="170"
print 'Cases not met';
Now the code above does what I want it to do but if I add the line
below i get a parse error:
case '22 35 Sat':
So how do I create a link from the images in my code?
p.s. please excuse the unintentional line breaks in the above code but
they are not there in the actual code I have written.