Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Feb 2007
    Posts
    217
    Thanks
    25
    Thanked 1 Time in 1 Post

    trying to display an image but i'm getting error messages

    I'm getting an error message: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

    on this line:

    PHP Code:
    echo "<img src='../../mdwpictures/thumbs/'.$bestandsnaam.$Countryrow['Randomt'].'.jpg?'.$rand.'><br>'"
    but I don't see what's wrong with the coding. It's not in the variables, it must be something with the quotes I guess?

  • #2
    Regular Coder
    Join Date
    May 2010
    Posts
    146
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by docock View Post
    I'm getting an error message: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

    on this line:

    PHP Code:
    echo "<img src='../../mdwpictures/thumbs/'.$bestandsnaam.$Countryrow['Randomt'].'.jpg?'.$rand.'><br>'"
    but I don't see what's wrong with the coding. It's not in the variables, it must be something with the quotes I guess?
    PHP Code:
    "<img src=\"'../../mdwpictures/thumbs/'.$bestandsnaam.$Countryrow['Randomt'].'.jpg?'.$rand.'\" /> 
    Try adding back slashes \ after the equals sign and before the end quote. It might fix it.
    Last edited by twobyfour; 06-26-2010 at 07:13 AM.

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    PHP Code:
    echo "<img src='../../mdwpictures/thumbs/".$bestandsnaam.$Countryrow['Randomt'].".jpg?".$rand."'><br>'"
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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