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

True way to see if action was successful?
If this is a good way to see if action was successful to continue:

Code: function changeGa

Multiple arrays inside data
Hi,

Simple question. I have a column called "array" in my database, and inserted in

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

Insert Failing.
Hey,
I am making a Sign up page for a website, but the insert query into the Database does not se

Pop-up Banner
Hello Friends,I need to use banner in our client site.Example: www.example.com if i enter this site

Help with usergroups? prolly really quick
So were coding our own forums for a game system we made an we have the users level setup but now I n

why preg_match_all does not return the number of matches
My regex looks like

X[^x{4e00}-x{9fa5}]*Y

(where X and Y are two Chinese characters)

What is SAP Avatar ?
Hi All,

This G.Satish , my boss asked me to explore on SAP Avatar. I searced in internet

Adding post count
How would I make it so everytime someone clicks submit on my form, their row in the database for the

Creating a custom API
I'm creating a site, and I need to create a basic API. Unfortunately I have no idea where to start.

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