cyphix
05-19-2008, 03:03 PM
Hey guys.... I'm trying to use split() to split some data into an array but it's not working.... it keeps being returned as one line. :(
Here is my code..
foreach ($data as $line) {
$line = trim($line);
$parts = split('~\s+~', $line, 2);
// ...
}
Here is some example data that I am using..
PAAB 12345
PAAD 12345
PAAI 12345
PAAJ 12345
PAAM 12345
PABD 12345
PABG 12345
PACB 12345
PACM 12345
Thanks for any help!
Here is my code..
foreach ($data as $line) {
$line = trim($line);
$parts = split('~\s+~', $line, 2);
// ...
}
Here is some example data that I am using..
PAAB 12345
PAAD 12345
PAAI 12345
PAAJ 12345
PAAM 12345
PABD 12345
PABG 12345
PACB 12345
PACM 12345
Thanks for any help!