Peace, I tried to replace a string with a string:
<?php
$Msg=$_POST['Msg'];
$arrA=array(' ' ,'-red' ,'-blue' ,'-green' );
$arrB=array('</font>','<font color=red>','<font color=blue>','<font color=green>');
$Msg_B=str_replace($arrA,$arrB,$Msg);
echo $Msg_B;
?>
It works well, but if someone typed "-rEdasddsadasda cccc" not "-redasddsadasda cccc"
or "-REDasddsadasda cccc" or anything like that how will my program slove this problem?
The text which I want to become like this:"asddsadasda cccc"