View Single Post
Old 01-06-2013, 12:06 AM   PM User | #11
elitis
Regular Coder

 
Join Date: Sep 2010
Posts: 319
Thanks: 9
Thanked 6 Times in 6 Posts
elitis is an unknown quantity at this point
Quote:
Originally Posted by AndrewGSW View Post
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.
__________________
Coding is a challenge, get used to it
Always remember to debug
Try the guess & check method
Break it down into simple steps
elitis is offline   Reply With Quote