this code works great. The only thing i can figure out how to do is convert this to an array. I have 26 to 38 rows (that number varies) what i would like to do is have it turn each row of results into its own array.
$row[1] col1, col3, col4, col5, col8
$row[2] col1, col3, col4, col5, col8
$row[3] col1, col3, col4, col5, col8
I then want to be able to access each result like this: echo $row[1]; How can i do this and how do i know when the row ends?
<?php
$a = file_get_contents( "t_rac.txt" );
$a = str_replace( array( "
" , "\t" ) , array( "[NEW*LINE]" , "[tAbul*Ator]" ) , $a );
foreach( explode( "[NEW*LINE]" , $a ) AS $lines ) {
foreach( explode( "[tAbul*Ator]" , $lines ) AS $li ) {
if (strpos($li,',') !== false)
{
}
else {
echo $li;
}
echo "<br>";
}
}
?>