This topic is locked
[SOLVED]

 Display Image Using Data Fields and File Name

12/23/2019 8:09:35 AM
PHPRunner General questions
G
geoffc author

Using custom display I am trying to get an image to display based on the data.
My attempt is:



$value="<img src=\"/_files/photo/".$data["user_id"]"_".$data["photo"]"_b.jpg\">";


Result should be:



/_files/photo/12_1_b.jpg



where 12 is user_id and 1 is photo
So far this gives me an error:



Parse error: syntax error, unexpected '"_"' (T_CONSTANT_ENCAPSED_STRING) in include/phpfunctions.php on line 922


Where have I gone wrong? Syntax error?
Regards,

Geoff