Replacing spaces in an array
Posted: Wed Dec 10, 2003 4:24 pm
how do i replace a space in an array with nothing??
thanks
thanks
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
$array[] = "Text With Space One";
$array[] = "Text With Space Two";
foreach($array as $key => $value)
$array[$key] = str_replace(" ", "", $value);
?>Code: Select all