how do i replace a space in an array with nothing??
thanks
Replacing spaces in an array
Moderator: General Moderators
-
goblinhybrid
- Forum Newbie
- Posts: 8
- Joined: Tue Dec 09, 2003 2:41 pm
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