inser variable into the src

  • Thread starter Thread starter Anonymous
  • Start date Start date
A

Anonymous

Guest
I would do it like this:

Code:
<img name="foto" src="immagini/avatar/<?php echo $_GET['avatar'];?>.png" border=1 height=100 width=100>

Since the ".png" part doesn't change, I put it outside of the PHP tags.
 
Back
Top