str_replace help


Posted on 16th Feb 2014 07:03 pm by admin

Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean up bad html to valid xhtml, I am using:

Code: $pee = str_replace('&', '&', $pee);
It works, but doesn't change & to &amp; when the content is inside of <blockquote><p>stuff here & there</p></blockquote>

can anyone assist?

No comments posted yet

Your Answer:

Login to answer
273 Like 24 Dislike
Previous forums Next forums
Other forums

Having a problem get the selected item from a drop down menu
I have been looking at this for days now.

I have a drop down menu that get it's values from a

PHP Include w/If IE Condition Statement?
I was having a problem with Internet Exploder (big surprise, right?) displaying my drop down menus i

Motivational Posters
Hello,

I wonder how can i do them in php. Are there any sample codes that you can show me?

fwrite error
Hi All,
Does anyone know what is causing the error in this code?

Code: <?
$error

Check if another session of the page is running?
I want to keep people from opening multiple tabs, or sessions of my Facebook app. Is it possible to

cURL Upload Help
OK, I am creating a bridge from a local program to my website and I am trying to find the best way t

php include email form with attachment
I have had no luck with finding a email form all over the Internet for various reasons. Some insecur

why aint this working?
i have this code:

Code: $num = 250;
$count = ($num - $rcount);

echo $rc

upload image name with extension using php
hi frds..

<input id="file1" type="file" name="file[]" &a

Storing/displaying image urls in a database?
Hi
Basically I have the following scenario:
User chooses picture from list. Picture info is ad

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash