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

Basic Question Regarding PHP Includes
Hi

Just starting out with PHP.

Working on a site that uses some basic includes, these

mysql_real_escape_string making variable equal nothing
i post a form and i post the variable:
Code: $var = $_POST[variable];then i echo $var its what i

IIS on 2003 anon access disabled issue
I have an IIS server that belongs to a domain, and anonymous access is turned off for all my sites.

getting Vars to pass to next page.
Hello all,
I have a confusing situation on my hands, i am a member of a gaming community and we

How to use php and sql to check if values match the ones in a table (for logins)
How would I code it that the script takes two variables that are passed to it (UserID and PIN), and

Gerenate tabel in Php
I whant to generate a tabel takeing data from database like this one so the results to be display on

Session is not saving
I am not trying to do anything too fancy, I am just trying to get some $_SESSION data to save and us

Weekly Calendar
Hi, I am looking at creating a weekly calendar. The calendar will read from Monday - Sunday. Does an

Custom array sort? asc then desc
Any ideas how I could sort this array? I've been trying for a while. Maybe with usort, but I have no

Limiting checkboxes?
Hi guys,

I have this code: Code: if(isset($_POST['selected'])) {
foreach($_POST['selec

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