php while and foreach loop will not work
<p>Please don't make me give you the "I'm not stupid speech"...But, has anybody ever experienced a while loop or a foreach loop not looping through an array? (LOL!) (I'm just trying keep myself from crying:(</p>

<p>Imagine the simplest while loop 2/3rds the way down my page that just won't work. I have tried everything, checked everything, it will go once, but not twice. No matter what I try.</p>

<p><strong>I put the loop in a test page and it worked!</strong> But not in the script I need it to. I have checked all my curly brackets to make sure they are open closed properly. There are no echos on this page, it is merely doing a lot comparing and sorting.</p>

<p>I have tried reset(), though it didn't need it.</p>

<p>The only echo's I put in were for testing, that is how I know it will get the first instance of the array and echo it, but then it goes into an endless loop, and have to stop the page...</p>

<p>Just as I was writing this I tried putting next() in the loop and it still wont advance the pointer. There are other while loops in the page, before this one, that are working just fine. I added this one to sort through an array and...it won't work???</p>

<p>Has anybody had this experience?</p>

<p>the code is:</p>

<pre><code>foreach($array as $key =&gt; $value)
{
   echo $key;
}
</code></pre>

<p>I know, pretty simple, just won't work???</p>
