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

$get problem
Hi Guys ...

can you please tell me what i am doing wrong here
Code: <?php

Undefined Variable: PHP_SELF, pls help
Hi,

Im a newbie on PHP / MySQL programming and Im running a script to search one field on my

how to populate a drop down box
Hi buddies!

PROCEDURE DOWNLOAD_REPORT_FORM (report_name varchar) is begin DOWNLO

How to show a complete textarea ??
I enter Client Case Notes notes in a textarea field on a PHP form. The field is 5 rows deep and 70 c

How to return to a previous page after running a PHP script
I'm having a bit of a melt down here because I think this should be really easy but can't work it ou

rdns with php
I am trying to build a script that will show all of the different domains that are hosted on the sam

Line break?
Hi, I'm new to the forum and new to php. I'm not sure if I'm using the correct terminology so here i

Using loop to count number of entries
I'm writing a program that must ask user to type in numbers. After each entry, the program has to re

Sendmail.php - heading error following check_input
Hi,

I would greatly appreciate some help? I am brand new to PHP and have been searching and e

Strange PHP/mySQL error ... am I just tired?
Code: <?

## CONNECT TO DB FUNCTION!
function ConnectTo($db2con)
{
$hostNam

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