prepare($query); if($sth) { $res = $sth->execute(); $numRows = $sth->rows(); PRINT ""; for ($i = 0; $i < $numRows; $i++) { $result = $sth->fetchrow_hash(); $ID = $result["id"]; $date1 = $result["messagedatetime"]; $date2 = explode(" ", $date1); $message = $result["message"]; $message2 = explode(" ", $message); $message3 = str_replace("$message2[0]","ping", "$message"); ?> $message2[0]"; PRINT ""; } PRINT "
$date2[1]"; PRINT "$message3
"; } else { PRINT "Could not prepare query: ".$sth->errstr."
\n"; } ?>