title: Use str_repeat in PHP on an array for events on a particular day in a calendar
body: <p>Ok I am using a script i found on <a href="http://davidwalsh.name/php-calendar" rel="nofollow">http://davidwalsh.name/php-calendar</a>  for creating an managing a calendar.  Currently I have reached the point were we are to query the database for events.</p>
  
  <pre><code>   /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !!  IF MATCHES FOUND, PRINT THEM !! **/
  
   $fulldate = strtotime("$month/$list_day/$year");
  
   mysql_select_db($database_dbconnect, $dbconnect);
   $query_cal = "SELECT * FROM calendar WHERE startdate &gt; '$fulldate' AND enddate &lt; '$fulldate' AND status = '1' ORDER BY eventtime DESC";
   $caldetails = mysql_query($query_cal, $dbconnect) or die(mysql_error());
   $cal = mysql_fetch_assoc($caldetails);
  </code></pre>
  
  <p>Now I have my events in an array.  The next line im presented with is</p>
  
  <pre><code>  $calendar.= str_repeat('',1);
  </code></pre>
  
  <p>Now I'm not understanding how im supposed to get my events into that line?I tried using a do or while loop but everything fails.  How do I get my array into the str_repeat?</p>