PDA

Click to See Complete Forum and Search --> : [RESOLVED] Display Image Using PHP Code


systech44
Nov 4th, 2007, 10:54 PM
Hi,

I have a problem regarding display image by using PHP. I am writing the following code. But it is giving me the following error:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/go/public_html/learnyoga/test.php on line 3

Please help me to cope up the situation.



<?php

echo "<input border='0' src='<?php print("pics/".strtolower($Array_Asanas_Names[$i]).".jpg"); ?>' name='img' type='image'>";

?>



Thanks a lot.

dclamp
Nov 4th, 2007, 11:11 PM
i am not sure what you did with your code, but here ya go:


<?php

$pic = strtolower($Array_Asanas_Names[$i]);
echo "<input border='0' src='pics/{$pic}.jpg' name='img' type='image'>";

?>

systech44
Nov 5th, 2007, 12:20 AM
Hi dclamp,

Thnaks a lot for the help. This is working fine.