title: If next item in looping array exists
body: <p>I want to check to see if within the current position of an array loop there is a further 1 or more elements left (without shifting the elements and counting):</p>
  
  <pre><code>public function build() {
      $_string = 'CREATE TABLE IF NOT EXISTS `' . dbbuilder::$prefix . $this-&gt;name . '` (';
      foreach( $this-&gt;rows as $key =&gt; $row ) {
          if( $__string = $row-&gt;get_string() ) {
              $_string .= $__string . ( next( $this-&gt;rows[$key] ) ? ', ' : '' );
          }
      }
      $_string .= ') ENGINE=InnoDB  DEFAULT CHARSET=utf8;';
      $this-&gt;string = $_string;
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>[string:private] =&gt; CREATE TABLE IF NOT EXISTS `ecom_accounts` (`id` init(11) NOT NULL  AUTO_INCREMENT`name` varchar(55) NOT NULL `email_address` varchar(255) NOT NULL `password` varchar(32) NOT NULL `multisite` varchar(5) NOT NULL `roll` int(4) NOT NULL DEFAULT '0') ENGINE=InnoDB  DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>I thought next() would work but it doesnt, also the <code>key</code> is a string not number.</p>