Jump to content

Simple String error


gibigbig

Recommended Posts

no you misunderstood me

 

ok there are these files in a directory:

 

 

file_id1_98.jpg

 

file_id2_43.jpg

 

file_id3_22.jpg

 

file_id4_11.jpg

 

 

 

i have the id from another variable $id.

i want to display the image where $id = the id from the image name regardless of the XX number

 

echo '<img src="dir/file_id'.$id.'_XX" />'; 

 

i dont know what to put in XX in the above php box so that the script will output the image with the desired id set in $id

Link to comment
https://forums.phpfreaks.com/topic/205575-simple-string-error/#findComment-1075716
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.