quote:
Originally posted by Madman
* Madman pukes
i suggest you read up on the basic php syntax because what your trying to do is horibly wrong, but to get you started this should* work
code:
<?php
$smiley_list = array(":)", "0:)", ":D", the rest of the smilies);
$replacement_list = array('<img alt="smiley" src="smilies/grin.gif" />', '<img alt="smiley" src="smilies/angel.gif" />', '<img alt="smiley" src="smilies/biggrin.gif" />', The rest of the replacements here, using this format: '<img alt="alttext" src="location' />");
$text = str_replace($smiley_list, $replacement_list, $text);
?>
If you are unsure about a function always refer to http://php.net
str_replace
also stiggys way works for each one :P
*i havnt tested it :P
ok, thats stopped the errors running up although, am i missing something, its still showing up as :o when i type it, oh noes!