title: next element in a associative php array
body: <p>This seems so easy but i cant figure it out</p>
  
  <pre><code>$users_emails = array(
  'Spence' =&gt; 'spence@someplace.com', 
  'Matt'   =&gt; 'matt@someplace.com', 
  'Marc'   =&gt; 'marc@someplace.com', 
  'Adam'   =&gt; 'adam@someplace.com', 
  'Paul'   =&gt; 'paul@someplace.com');
  </code></pre>
  
  <p>I need to get the next element in the array but i cant figure it out... so for example</p>
  
  <p>If i have </p>
  
  <pre><code>$users_emails['Spence']
  </code></pre>
  
  <p>I need to return matt@someplace.com and if Its </p>
  
  <pre><code>$users_emails['Paul'] 
  </code></pre>
  
  <p>i need start from the top and return spence@someplace.com</p>
  
  <p>i tried this</p>
  
  <pre><code>$next_user = (next($users_emails["Spence"]));
  </code></pre>
  
  <p>and this also </p>
  
  <pre><code> ($users_emails["Spence"] + 1 ) % count( $users_emails )
  </code></pre>
  
  <p>but they dont return what i am expecting</p>