function print_msgs2($ar, $msgs) { $keys = array_keys($ar); print "<dl style='position:relative; left:0px'><dd>"; foreach ($keys as $key) { print $msgs[$key]; print "<BR>"; if (sizeof($ar[$key]) > 0) { print_msgs2($ar[$key], $msgs); } } print "</dd></dl>"; }
function print_msgs2($ar, $msgs, $msg_id) { $keys = array_keys($ar); print "<dl><dd>\n"; foreach ($keys as $key) { print $msgs[$key]; print "<BR>\n"; if (sizeof($ar[$key]) > 0) { print_msgs2($ar[$key], $msgs, $msg_id); } } print "</dd></dl>\n"; }
function print_msgs2($ar, $msgs) { $messages = array(); $keys = array_keys($ar); foreach ($keys as $key) { $row = $msgs[$key]; $messages[] = array('id' => intval($row['id']), 'status' => intval($row['status']), 'subject' => api_get_subject($row['subject'], $row['status']), 'author' => array('id' => intval($row['auth']), 'name' => $row['username']), 'created' => $row['created'], 'views' => intval($row['views']), 'likes' => intval($row['likes']), 'dislikes' => intval($row['dislikes']), 'page' => intval($row['page']), 'parent' => intval($row['parent']), 'closed' => filter_var($row['post_closed'], FILTER_VALIDATE_BOOLEAN), 'flags' => intval($row['content_flags']), 'answers' => sizeof($ar[$key]) > 0 ? print_msgs2($ar[$key], $msgs) : array()); } return $messages; }