I'm trying to find which function fits the script. My objective is to find all the records where there are
including the misspellings (
nbsp;,
nbsp,
 ) and replace them with the space bar
" ":
PHP Code:
$sql = "SELECT * FROM ".$acronym."_pages WHERE content LIKE '%nbsp%'";
$result = mysql_query($sql) OR exit( 'Error: ' . mysql_error() );
//echo $sql;
function nbspSearch(){
//insert code here
}
while($row = mysql_fetch_array($result)){
sql2 = "UPDATE ".$acronym."_pages SET content = '".str_replace(nbspSearch(), " ", $row['content'])."' WHERE content = '".$row['content']."'";
}
mysql_close($con);
If anyone has a better suggestion than mine let me know. Thanks.