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

comparing tables across databases sql refinement ideas required
Hi all

Via pl/sql I need to ensure that data between tables in different databases match

Any help with my email script?
I have an email script, I have not tested it, although someone tested it for me and said it worked f

Calander Basic Spript help
hi, just starting out with PHP and have the following script:

<?php
//This gets t

If statement help please.
Hello on my site I have 2 content boxes. 1 is for the main content (which is the biggest one) and th

need to apply an if/else statement to Tim Thumb script
Not sure how to work this. I essentially want to call a variety of image sizes based on which style

captcha error
I have been trying to implement a captcha in php...

here is the code..
Code: (php) [Select

Transform value 0 in no and 1 in yes help needed
Hello,
I have this in the table: "value" type int 0 to represent false and 1 to represe

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

PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f

do while...woes
I'm sure this is childsplay but it is stumping me, everytime i try what I think would make this work

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