strstr() dont work in php -
i use code in php strstr():
$conversation = strstr($bash, '_'); $pseudo = strrchr($bash, '_'); //on ajoute les balises html au pseudo et la conversation $cherche = array($pseudo, $conversation); $remplace = array("'<span class=\"pseudo\">' , $pseudo , '</span>'", "'<span class=\"pseudo\">' , $conversation , '</span><br />'"); str_replace($cherche, $remplace , $bash); echo $bash;
echo function display $bash nothing has changed in text , no errors message.
str_replace()
returns modified string, not in-place change.
$new_bash = str_replace($cherche, $remplace, $bash);
Comments
Post a Comment