Page 1 of 1

picture in link

Posted: Tue Feb 10, 2004 2:09 pm
by Infinity
in a link i need to replace the text with a picture but i cant seem to get the format correct

Code: Select all

<?php
echo "<tc><td background='./templates/fisubsilversh/images/cellpic_nav.gif'><div align='center'><a href="$row[dllink]">picture here</a></div></td></tr>";
?>
I need to replace picture here with the picture or icon in this case i.e.
./templates/fisubsilversh/images/icon_download.gif

Posted: Tue Feb 10, 2004 2:50 pm
by DuFF

Code: Select all

<?php
$search = "picture here";
$replace = "<img src='./templates/fisubsilversh/images/icon_download.gif' />";
$subject = "<tc><td background='./templates/fisubsilversh/images/cellpic_nav.gif'><div align='center'><a href="$row[dllink]">picture here</a></div></td></tr>";
$doreplace = str_replace($search, $replace, $subject);
?>

Posted: Tue Feb 10, 2004 3:04 pm
by Infinity
Thanks duff