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:

Did you know?Explore Trending and Topic pages for more stories like this.
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

PEAR in appliactiond development
When I was picking up PHP I went from procedural programming, fairly quickly into OOP, then after wr

dropdown box help - open php files to textarea
Hi, I am using tinymce to edit content located in several php files. The code I attached works but i

login page does not execute a else statement
I've created a login page using sessions.
When an incorrect user name or password is entered then

Table Control
Hi Guru's,

I've created a Module pool program, which contains the Table Control.

Get relative path from absolute path
How would one go about getting the relative path to a file from its absolute path?

Setting/Modify Headers using mail() function
I have a question about setting email headers when using mail() in a php script.

When I send

Just a white page
Okay so, my website, when I click SignUp on it it takes me to /join.php but its a complete white pag

Take info from one coloum and move to another
Hi all,

I have this:
Code: [Select]$array = "SELECT stock_id FROM stocks WHERE stock_

Displaying image from database
Hi,

I've got a site where that's got a database behind it. Currently it has loads of items in

Mass activity scheduling
Hi experts,

Im facing some problems to deal with mass activity jobs.
When I run some

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