$time) { if (!isset($_SESSION['tsChatBoxes'][$chatbox])) { $now = time()-strtotime($time); $time = date('g:iA M dS', strtotime($time)); $message = "Sent at $time"; if ($now > 180) { $items .= << { "items": [ ] } $void) { $items .= chatBoxSession($chatbox); } } if ($items != '') { $items = substr($items, 0, -1); } header('Content-type: application/json'); ?> { "username": "", "items": [ ] } ",$text); return $text; }