Edited by Jaan, 08 June 2010 - 09:43 AM.
Show smileys using str_replace()
Started by
Guest_Jaan_*
, Feb 08 2007 08:16 AM
3 replies to this topic
#1
Guest_Jaan_*
Posted 08 February 2007 - 08:16 AM
Guest_Jaan_*
|
|
|
#2
Posted 08 February 2007 - 05:44 PM
// This will determine things what you want to replace
$replace = array(":)", ":D", ":(");
// This will determine your text replacement
$replace_to = array("<img src='smile.gif'>", "<img src='laugh.gif'>", "<img src='sad.gif'>");
$content = str_replace($replace, $replaceto, $text);
With the str_replace when you use the $replaceto variable, shouldn't it be $replace_to, like the variables name?
Myspace Resources
I am currently willing to do just about anything for $50 on paypal, anyone need odd jobs done?
#3
Guest_Jaan_*
Posted 09 February 2007 - 03:13 AM
Guest_Jaan_*
oops.. my bad oki i fixed it.. thanks
#4
Posted 09 February 2007 - 10:21 AM
Just thought you might like to know :)
Myspace Resources
I am currently willing to do just about anything for $50 on paypal, anyone need odd jobs done?


Sign In
Create Account


Back to top










