'; $result = static::search($text, $qty); $i = 0; foreach ($result->data->children as $post) { if ($i++ > $qty) { break; } $post_title = $h(trim($post->data->title)); if ($post->data->score >= 10) $post_title = "$post_title"; $html .= '
  • ' . $post_title . ""; $author = $post->data->author; $html .= ' ' . $post->data->score . ' points, submitted ' . DateTime::contextualTime($post->data->created_utc) . ' by ' . $h($post->data->author) . '
  • '; } return $html . ''; } }