file flusers1 txt count for arr explode substr -1 array array nickname

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
$f = file("./flusers1.txt");
$c = count($f);
for( $i = 0; $i < $c; $i++ )
{
$arr = explode(" - ", substr($f[$i], 0, -1));
$array[$i] = array(
'nickname' => $arr[0],
'mail' => $arr[1],
'name' => $arr[2],
'number' => $arr[3][0]=='-'?substr($arr[3], 2):$arr[3]
);
}