= '0' && $packet{$i} <= '9')) { $status .= $packet{$i}; $i--; } $status = strrev($status); $status = trim($status); // Grab the number of new messages while ($packet{$i} == ' ') $i--; while ($packet{$i} != ' ') { $newmsgs .= $packet{$i}; $i--; } $newmsgs = strrev($newmsgs); $newmsgs = trim($newmsgs); // Grab the nick while ($packet{$i} == ' ') $i--; while ($i > $stop) { $nick .= $packet{$i}; $i--; } $nick = strrev($nick); $nick = trim($nick); // Now we have a user, lets build a list struct then display the list $user = array($id, $nick, $newmsgs, $status, $pp); if ($allusers == 0) $allusers = array($user); else array_push($allusers, $user); $packet = socket_read($sock, 512, PHP_NORMAL_READ); } } } ?>