Results 1 to 3 of 3

Thread: [RESOLVED] Display Image Using PHP Code

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    266

    Resolved [RESOLVED] Display Image Using PHP Code

    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 Code:

    <?php

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

    ?>
    Thanks a lot.

  2. #2
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: Display Image Using PHP Code

    i am not sure what you did with your code, but here ya go:

    PHP Code:
    <?php

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

    ?>
    My usual boring signature: Something

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    266

    Thumbs up Re: Display Image Using PHP Code

    Hi dclamp,

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width