diff --git a/index.php b/index.php index 0358d9b8a..9f25d8754 100644 --- a/index.php +++ b/index.php @@ -64,7 +64,7 @@ foreach($NEWS_ENTRIES as $entry) { } } foreach($frontpage as $entry) { - $link = substr($entry["id"], 15); // Strip http://php.net/ + $link = preg_replace('~^(http://php.net/|https://www.php.net/)~', '', $entry["id"]); $id = parse_url($entry["id"], PHP_URL_FRAGMENT); $date = date_create($entry['updated']); $date_human = date_format($date, 'd M Y');