Advertisement
Guest User

php function echo img html tag

a guest
Jul 21st, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.23 KB | None | 0 0
  1. <?php
  2.  
  3. function imagem($url, $alt, $width = 400, $height = 400) {
  4.     echo "<img src=\"$url\" alt=\"$alt\" width=\"$width\" height=\"$height\">";
  5. }
  6.  
  7. imagem('https://altopedia.com/images/6/67/SubSun.jpg', 'Sublime Band', '200', '200');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement