title: how can i get foreach loop variable outside of loop
body: <p>Here is the code of <b>wordpress custom plugin.</b>?</p>
  
  <pre><code>$pages = get_pages();
  foreach ($pages as $page) {
    $pagee=$page-&gt;post_title;
  }
  echo $pagee; &lt;---- I want here all pages name in variable.
  </code></pre>
  
  <p>please suggest how can i do it.</p>