code:
<?
$search = array('0star','1star','2star','3star','4star','5star');
$replace = array('Rating Coming Soon','<img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif">');
echo str_replace($search, $replace, $post);
?>
This code would output as blank as there is no value being past to the function within the $post variable. To make the code work you would need to use something along the lines of the following:
code:
<?
$post = "0star 1star";
$search = array('0star','1star','2star','3star','4star','5star');
$replace = array('Rating Coming Soon','<img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif">');
echo str_replace($search, $replace, $post);
?>
Hope this helps
Jamie