'.waveTime($arr['dt']).'
'.$arr['usr'].'
'.$arr['usr'].': '.$arr['comment'].'
'; // Output the comment, and its replies, if any if($arr['replies']) { foreach($arr['replies'] as $r) showComment($r); } echo '
'; } function waveTime($t) { $t = strtotime($t); if(date('d')==date('d',$t)) return date('h:i A',$t); return date('F jS Y h:i A',$t); // If the comment was written today, output only the hour and minute // if it was not, output a full date/time } ?>