...

View Full Version : trying to display an image but i'm getting error messages



docock
06-26-2010, 05:51 AM
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:


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?

twobyfour
06-26-2010, 07:08 AM
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:


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?


"<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.

_Aerospace_Eng_
06-26-2010, 09:19 AM
echo "<img src='../../mdwpictures/thumbs/".$bestandsnaam.$Countryrow['Randomt'].".jpg?".$rand."'><br>'";



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum