Re: multi-dimensional arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nitsan Bin-Nun wrote:
$string = "xxx  xxxx  xx  xxxxx  xx   xxx
xxx  xxxx  xx  xxxxx  xx   xxx";
$t = explode("\n", $string);
foreach ($t as $k => $v) $t[$k] = explode(" ", $v);
var_dump($t);

After assigning the string do

$string = preg_replace('/\s+/',' ',$string);

Then you should be able to do the two explodes.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux