Reputation: 182
Here is the HTML Code :
<a href="?loadurl=/search/Battlefield 3/1/99/0/">
<img src="static/img/next.gif" border="0" alt="Next" />
</a>
And this is the PHP Code :
//Fix Icons
$toremove = str_replace("next.gif\" border=\"0\" alt=\"Next\">", "dot.jpg\" border=\"0\" alt=\"Next\"><i class=\"icon-magnet\" style=\"color: #ffdd00;text-decoration: none;\"></i>", $toremove);
What am I doing wrong ? Any help would be appreciated :)
~Kazilotus
Upvotes: 0
Views: 101
Reputation: 9200
Your HTML is using XHTML syntax: <img ... />
but your PHP is looking for HTML syntax: <img ... >
. You need to make up your mind which to use and stick with it.
For example,
$toremove = str_replace("next.gif\" border=\"0\" alt=\"Next\">", "dot.jpg\" border=\"0\" alt=\"Next\"><i class=\"icon-magnet\" style=\"color: #ffdd00;text-decoration: none;\"></i>", $toremove);
Should be:
$toremove = str_replace("next.gif\" border=\"0\" alt=\"Next\" />", "dot.jpg\" border=\"0\" alt=\"Next\"><i class=\"icon-magnet\" style=\"color: #ffdd00;text-decoration: none;\"></i>", $toremove);
In your sample code.
Upvotes: 5