I can't get the code below to work... I'm new to str_replace
- this is my first time using it!
I'm trying to get it so special characters are removed from the value...It's messing up jQuery...
Code:
<ul>
<?php
$sql01 = mysql_query("SELECT * FROM pages");
while($menu = mysql_fetch_array($sql01)){
$themenuitem = $menu[3];
$replaceit = str_replace($fooarray, "_", $themenuitem);
$fooarray = array(":", "!", "?", "<", ">", "(", ")", "%", "$", "#", "@", "*", "&", "^", "{", "}", "[", "]", "/", "\\", "'", "\"", "+");
?>
<li><a href="?page=<?php echo $menu[3]; ?>" id="<?php echo $replaceit; ?>"><?php echo $menu[0]; ?></a></li>
<?php
}
?>
</ul>
Thanks,
X96
Bookmarks