K3nnnn Posted November 20, 2006 Share Posted November 20, 2006 im making a small cms for a personal site for a project of mine. the script runs through a mysql table and echos the latest 5 article postings, well the title anyway. Its working great but i want it to also echo the 'tagline/description' aswell from the database, Ie title then description. no matter what i try it prints one or the other if its any help heres the script[quote]<link href="my.css" rel="stylesheet" type="text/css" /><?php include("header.php"); ?><b><span class="content_header_pined">Latest Articles: </span></b><br><?php// Require the database classrequire_once('includes/DbConnector.php');// Create an object (instance) of the DbConnector$connector = new DbConnector();// Execute the query to retrieve articles$result = $connector->query('SELECT ID,title FROM cmsarticles ORDER BY ID DESC LIMIT 0,5');// Get an array containing the results.// Loop for each item in that arraywhile ($row = $connector->fetchArray($result)){echo '<p> <a href="viewArticle.php?id='.$row['ID'].'">';echo $row['title'];echo '</a> </p>';echo '<hr />';}?><?php include("footer.php"); ?>[/quote] Link to comment https://forums.phpfreaks.com/topic/27897-help-needed-with-an-php-article-listing-script/ Share on other sites More sharing options...
almightyegg Posted November 20, 2006 Share Posted November 20, 2006 echo "$row[description]"; Link to comment https://forums.phpfreaks.com/topic/27897-help-needed-with-an-php-article-listing-script/#findComment-127562 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.