title: How do I echo the session name in a foreach loop in PHP?
body: <p>I am looping through my session variables. I have been able to echo the session values, but I would also like to echo the session name that corresponds with that value.</p>
  
  <p>How do I echo out the session variable name each time it loops?</p>
  
  <p>This is the code I currently have:</p>
  
  <pre><code>foreach($_SESSION as $value) {
      echo  'Current session variable is: ' . $value . '&lt;br /&gt;';
  }
  </code></pre>