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
77 Like 18 Dislike
Previous forums Next forums
Other forums

Schedule editor
Hi,

I have a question related to Schedule editor.
If we schedule a BLS for every 30

Wierd if else problem
Hi guys,

this probably aint wierd for you, but it seems like php is playin up to me. may b i

values in array being escaped
I would like to submit some values - back to the same form for checking before processing...

socket makes browser hang...
I have a socket server, and I am having a problem at the moment...

A browser sends a http hea

Match stored value with the current value in a loop
Hello,

I have a MySQL db were I store articles in.

I have a form to fill these article

Display certain image depending on time of year
Hi, I am new to these forums and would really appreciate some advice on a piece of coding I have don

Random date selection
i want to select random date with time(hour+minutes+sec) where date is specified(10/22/2009) and tim

mysql query with single quotes in a variable
$sitedetails = "INSERT INTO vars (address, sitename, description, ownername, theme) VALUES ('$u

Show specific day of the week
I have been racking my brain trying to get this function to work properly and it is doing so for eve

user validation always displaying invalid ? please help
Hello,

I have 2 accounts and there is a field in mysql called validated it can be either &quo

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