hey peeps
does anyone know why the '2' 's dissapear after running this script
<?
include("includes/auth/common.php");
$string = "
2
2fort
2nd
2rooms
2vs2
";
$string = addslashes($string);
$sql = "SELECT * from waypoints where type='other'";
$query = mysql_query($sql) or die (mysql_error());
while ($row=mysql_fetch_array($query)) {
$name = $row[name];
$name = str_replace(".zip", "", $name);
// echo $name;
$string = str_replace($name, "", $string);
}
$string = nl2br($string);
$string = stripslashes($string);
echo $string;
?>
that should give a blank output if their are records in the database which equal the corresponding line
however it returns
fort
nd
rooms
vs
which is basically removing all the 2's from the script 😕
can anyone help?