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

ereg_replace()
Basically what i need to do is

$title = "This Suck's"

$striped = ereg_repl

HTML form problem
Ive made a form to that i want to send to my email via PHP. but when it send only the name's etc sen

Help with looping
I have a comma separated list of colors taken from a database ($ICo) and a directory of images named

Syntax Help
I'm trying to make a form that edits a php file which contains config settings. I'm using strings t

Members Only
Hi all, for my website i have a members area only which on members can veiw, but at the moment anyon

Setting condidtions for an input box
Hi all,

I would like to set a condition in a txt box that says the number a user enters has t

foreach iterator
Hi Guys
Does the foreach loop have an inbuilt iterator ?

Get value from Select menu
Hi!

Have tried to find the solution on the web. Don't know if there is an easy one. A descrip

C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.
What libr

Replacing a string on click of a button
Hi! Is there a way to replace a string on a click of a text link?

This is what I've come up w

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