how come I cant get each arrays elements in an array if i read it in txt file?
<p>says the orders.txt contains</p>

<pre><code>hello
hello
hello
</code></pre>

<p>Code:</p>

<pre><code>&lt;?php
  $orders = file("orders.txt");

  $row_count = count($orders);

  for ($row = 0; $row &lt; $row_count; $row++) {
        $col_count = count($orders[$row]);

        for ($col = 0; $col &lt; $col_count; $col++) {
            echo $orders[$row][$col];

        }
  }

?&gt;
</code></pre>

<p>I found that the cause of error here is that <code>count($orders[$row])</code> didn't return the total number of element in this array.</p>

<p>the text files in .txt are multidimensional array right?</p>

<p>If i create a multidimensional array I can get each arrays element count in the multidimensional array by using count()</p>

<p>but here im reading from the .txt file and I think it is multidimensional array </p>

<p>My question:</p>

<p>I get the rows count, but not the column count.<br>
I know i can do <code>strlen($orders[$row])</code> instead, but why <code>count($orders[$row])</code> is not possible.</p>
