0) ? $result = $row2['msg'] : $result = "No message available"; (strlen($result) > 20) ? $msg = substr($result, 0, 20) . '...' : $msg = $result; if (isset($row2['post_msg_id'])) { ($current_user == $row2['post_msg_id']) ? $you = "You: " : $you = ""; } else { $you = ""; } ($row['status'] == "Offline") ? $offline = "offline" : $offline = ""; ($current_user == $row['unique_id']) ? $hide_me = "hide" : $hide_me = ""; ($row['img']) ? $img = $row['img'] : $img = "default.png"; $output .= '
' . $row['first_name'] . " " . $row['last_name'] . '

' . $you . $msg . '

'; } ?>