From 243aae7b1778ae53b77d82f2e33a1037d6eb0a5c Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Thu, 1 Jun 2023 09:56:33 -0500 Subject: fix accidental line ends --- index.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index fa92db9..8c6d8e7 100644 --- a/index.php +++ b/index.php @@ -177,16 +177,18 @@ function get_user(string $api_url, string $inline_title) { $limit = count($response['submitted']) > 10 ? 10 : count($response['submitted']); if (count($response['submitted']) > 0) { for ($i = 0; $i < $limit; $i++) { - $sub_url = 'https://hacker-news.firebaseio.com/v0/item/' . $response['submitted> + $sub_url = 'https://hacker-news.firebaseio.com/v0/item/' . $response['submitted][$i] . '.json'; $sub_response_raw = file_get_contents($sub_url); $sub_response = json_decode($sub_response_raw, true); // TODO: Create switch-case to cover a story, comment, job, poll, or pollopt - $html = '
' . $sub_response['title']> - $html .= '

'; + $html .= '

by '; + $html .= $sub_response['by'] . ' | ' . $sub_response['score']; + $html .= 'points

'; + $html_output .= $html; } } else { $html_output .= '

User has no subsmissions.

'; -- cgit v1.2.3-70-g09d2