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

SOAP Issue
Hi,

I am facing some understanding problem with SOAP basic.kindly recommend some SOAP expert.

Please Help my PHP Dating Function.
Hi everyone!

Well here is my code that displays this:

It works wonderful.


asking for direction
I have 2 tables in my data, which are "post" and "event"
I won't make a summa

Load Animated Image while cache is serve
I have a page that loads up using cache and took about 1 to 2 minutes before it loads to the page. <

quotes changing
hi all

in my content

opening quotes " changes to “

close qu

Unable to retreve the values from Mysql Query
Hi,

Here is the php code that I have, Query is running properly in phpmyadmin and is resu

calculator
I can't figure out why this code doesn't work. No error messages. Page loads.

Code: <

INSERT data problem!
After having an string with apostrophes ', double quotes " or any other special characters, suc

How to convert this array to string
I am having problems converting this array to a string
using print_r($val[1]); I get:
Code: [

HeaderSelectedCssClass not working
I have an accordian where I have a drop down list in the first pane and a grid in the second pane.

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