Hey everyone,
Had some problems using str_replace the first time I tried it. Here's what I did:
$contents = str_replace("<br>", "<p>", $contents);
echo $contents;
Pretty simple, right? Except that $contents is returned without any modifications having been performed on it.
I modified the code thusly and it worked fine:
$newfile = str_replace("<br>", "<p>", $contents);
echo $newfile;
It's just an annoyance, but why should I have to create a new variable, when what I really want to do is modify the original one? 😕
Thanks in advance for your replies !
My apologies if the answer is obvious !