$myurl="About us";
$mynewurl=strtolower(str_replace(" ","",$myurl));
urtrivedi
Nearly a Posting Virtuoso
1,306 posts since Dec 2008
Reputation Points: 257
Solved Threads: 270
Pretty much as urtrivedi says.
$links = array("Home", "About us", "Our Services");
foreach($links as &$link ){
$link = strtolower(str_replace(" ","",$link));
}
Although you've now changed the original array.
$links = array("Home", "About us", "Our Services");
foreach($links as $link ){
$urls[] = strtolower(str_replace(" ","",$link));
}
will place new array as $urls
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080