title: replace last element in array php
body: <p>here an array</p>
  
  <pre><code>$item = new rssGenerator_item();
  $query_rss = mysql_query("SELECT * FROM `trades` WHERE `app` = '1' ORDER BY `id` DESC LIMIT 10 ")OR die(mysql_error());
  while($row_rss = mysql_fetch_array($query_rss)){
      $item-&gt;title = $row_rss['unit'];
      $item-&gt;description = excerpt($row_rss['message'],30);
      $item-&gt;link = 'http://injaa.com/'.$row_rss['link'];
      $item-&gt;guid = $row_rss['site'];
      $item-&gt;pubDate = RelativeTime($row_rss['tarikh']);
      $rss_channel-&gt;items[] = $item;
  }
  $rss_feed = new rssGenerator_rss();
  $rss_feed-&gt;encoding = 'UTF-8';
  $rss_feed-&gt;version = '2.0';
  header('Content-Type: text/xml');
  echo $rss_feed-&gt;createFeed($rss_channel);
  </code></pre>
  
  <p>at this line </p>
  
  <pre><code>$rss_channel-&gt;items[] = $item;
  </code></pre>
  
  <p>all value before this clear and replace last value into array!!
  i dont now where is the code is wrong?</p>