title: Reading 2D Array from a text file, HELP!
body: <p>UPDATE: I realized that the issue was I was using print instead of echo to print the data, so it was showing the array instead of the data within it. Thanks a ton guys!</p>
  
  <p>I currently have a text file that looks like this:</p>
  
  <pre><code>0,0,0,0,0
  0,0,0,0,0
  0,0,0,0,0
  0,0,0,0,0
  0,0,0,0,0
  </code></pre>
  
  <p>And I'm using this function:</p>
  
  <pre><code>function rFile($fileName){
  $resultF = fopen($fileName, "r") or die("can't open file");
  $array = array(); //Create the first dimension of a 2D array
  $i=0;
  while(!feof($resultF)){
    $line = fgets($resultF);
    $line = trim($line, "\n");
    $tokens = explode(",",$line);
    $array[$i]=array(); //Create the second dimension of the 2D array
    $tokenCount = sizeof($tokens);
    for($j=0; $j&lt;$tokenCount; $j++){
      $array[$i][$j] = $tokens[$j];
    }
    $i++;
   }
  return $array;
    }
  </code></pre>
  
  <p>Essentially, it's supposed to read through the file, explode each "0" and store it in a 2D array, $array. For some reason it returns this:</p>
  
  <pre><code>Array[0]
  Array[1]
  Array[2]
  ....etc etc
  </code></pre>
  
  <p>Anyone know what I did wrong?</p>