title: PHP: Sorting inside foreach
body: <p>How can i sort by value the following code</p>
  
  <pre><code>$countries = array ('Europe/Rome', 'Europe/Athens', 'America/Tijuana', 'Canada/Atlantic', 'Europe/Amsterdam');
  foreach ($countries as $country =&gt; $country_offset) {
  $offset = timezone_offset_get( new DateTimeZone( $country_offset ), new DateTime() );
  echo $offset . '&lt;/br&gt;';
  }
  </code></pre>