Quote:
Originally Posted by AndrewGSW
PHP Code:
$subcategory = $article['id'];
Where is this $article array coming from and does it contain correct values? use print_r() to display it. Use View Source on the page to read it more easily.
|
PHP Code:
<?php
//News articles start
$news = mysql_query("SELECT * FROM `news` ORDER BY `date` DESC LIMIT 10");
while($article = mysql_fetch_array($news)) {
$articlePosted = $article['date'];
$datePosted = date("F jS, Y", strtotime($articlePosted));
if (empty($_GET['id'])) {
database. And yes its values are correct. Later on in the code, $article is echoed just fine.