In $ruta I have the value "imagenes/1.jpg" If I do that, I display the image
<img src="imagenperfil/<?php echo $ruta; ?>" width="250" height="300">
but now I have this:
echo "<div class='tweet_user'><img class='user_img' src=''></div>";
So in src I would like to put
"imagenperfil/<?php echo $ruta; ?>"
I try lots of ways and none works. thanks a lot! you always solve my all my problems
$ruta = htmlspecialchars($ruta);
echo "<div class='tweet_user'><img class='user_img' src='imagenperfil/{$ruta}'></div>";
Added htmlspecialchars()
If you tried to do this:
echo "<div class='tweet_user'><img class='user_img' src='"imagenperfil/<?php echo
$ruta; ?>"'></div>";
then it won't work. You are already in php and using echo
You can try this:
echo "<div class='tweet_user'><img class='user_img' src='imagenperfil/".$ruta."'></div>";