PHP backwards foreach issue
<p>I want to use foreach to loop through the results of the php scandir function and then display the file name and <strong>then</strong> the size but when I use the code:</p>

<pre><code>$scan = scandir("/home/foo");
foreach ($scan as $value) {
echo "$value" . "&lt;br&gt;" . filesize("/home/foo/$value") . " ";
}
</code></pre>

<p>what I end up with is the filesize value first and then the $value, like this:</p>

<pre><code>3337 Desktop
4096 Downloads
4096 Mail
4096 Scripts
</code></pre>

<p>Why is this? and how do I get it to format in the same order as the code, ie. name of file and then the file size?</p>
