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

Displaying a clickable playername
I am going wrong somewhere with the mysql_query, can someone please put me straight?

$playern

Curly Bracket Delimeters.
I'd always believed that the starting and ending delimeters in preg_ functions had to be the same ch

Php WordPress help
I am writing the following code for making a plugin

<?php
header("Content-Type

Creating a function
Basically i wanna put all this code in a seperate file

Code: <?php

Insert to MySQL inside foreach
Hey.
I am parsing some html, and putting inside an html db.
I need to create a randomized inte

On page view, minus credit
Hello all, please, I need a little help with this script. I am charging one credit (credits can be p

please help
HTML Code:

Code: <span id="ctl00"><span>

A little help in c#
i am doing a simple paint program using c# i want to draw with the mouse so i wrote the code of the

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

Mail Script Problems
I have created a PHP mail script. I am having a problem though. In $body i am trying to put two va

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