echo() versus print() syntax
Posted: Sun Aug 03, 2008 5:04 am
hello all
my articles database referred below has php code snippets which I want to retrieve using the mysql_query string and append to my code to complete.
Can somebody correct my incorrect echo command (or printf) on line8 below to achieve this.
thanks very much
Conor
my articles database referred below has php code snippets which I want to retrieve using the mysql_query string and append to my code to complete.
Can somebody correct my incorrect echo command (or printf) on line8 below to achieve this.
thanks very much
Conor
Code: Select all
<?php
require_once("../rss/rsslib.php");
include ('../admin/config.php');
// fetch the code from articles table in articles db based on the ID
$result = mysql_query("SELECT article.ArticleID, articles.snippet FROM articles WHERE ArticleID='2' ", $dblink);
//now add the retrieved code snippets to my php string to complete the php code
echo $result,"snippet");
?>