str replace
Moderator: General Moderators
str replace
what would be the full php tag to change text into an image like the smiley's. sometimes like someone gives me the code im not exactly sure where the hell im gonna put it, should it be as an include, should it not, etc, etc. :\ yea it sounds n00bish but this is a php board fer help.
Code: Select all
<?php
// $string is whatever text you want to replace =) with the image is
$string = str_replace('=)','<img src="smiley.jpg">', $string);
echo $string;
?>