hi there im pretty new at php ... just working on a homework and we have this task to separate an array that has contents.. but the trick is to separate the contents and put it in a new array with the contents organized.
However, my new array is wrong. One index should contain all names into 1 string another index with all the phone numbers ...etc
mine displays like the one at picture
Any suggestions? the pic of code is also attached
<pre>
<?php
$fileName = "c:/wamp/www/datebook";
$line = file($fileName);
print_r($line);
foreach($line as $value)
{
$newLine[] = explode(":",$value);
}
print_r($newLine);
?>
</pre>
these is little piece, they are 26 in total.. thats from notepad
Jon DeLoach:408-253-3122:123 Park St., San Jose, CA 04086:7/25/53:85100
Sir Lancelot:837-835-8257:474 Camelot Boulevard, Bath, WY 28356:5/13/69:24500
Jesse Neal:408-233-8971:45 Rose Terrace, San Francisco, CA 92303:2/3/36:25000