2
I need to traverse a string and within this string will come tags from imagens
I need to select the first one.
I’m using the strstr()
but it’s not working.
$img = strstr($texto, '%img');
echo $img;
How should I do to have the right goal ?
The reason for using this question is because I am saving a post where I give option to save with image along, but I need to preview this post where you make a thumbnail with the image. So I need to go through this string so that I can identify which image relates to that post so I can go to the folder and identify to mount the thumbnail.
what makes this PHP_EOL.$value ?
– Renan Rodrigues
PHP_EOL
is to open new line correctly on the platform in use (End Of Line), in combination with theecho
allows to see the output in multiple lines... without it we would haveimagem1.jpgimagem2.jpg
;)– Zuul
Ual kkkkk thanks for the full answer !
– Renan Rodrigues