channel->item)-1);; $usedRandKeys = array(); while( $i <= $numberItems ) { while(in_array($j, $usedRandKeys)) { $j = rand(0, count($xmlDoc->channel->item)-1); } $usedRandKeys[] = $j; $i++; $textString = ' '; // if box is last item if( $i == $numberItems ) { $textString .= ' '; } else { $textString .= ' '; } echo $textString; fwrite( $rssFeedHandle, $textString ); if( $i == $numberItems ) break; } fclose( $rssFeedHandle ); } else { include 'rssFeed.html'; } } ?>
'.$xmlDoc->channel->item[$j]->title . ' '.$xmlDoc->channel->item[$j]->title . '