Hi,
I have a page that is currently echoing some news from a mySql database. It is fine as it is but I would like to go a step further and make it a little fancier.
As it stands, the code prints the title of the news piece in large bold letters (h1) and then prints the article itself in a regular font.
I would like to do now what most news websites do, that is, they usually print the title in large fonts, the first paragraph in bold, and the rest of the news in plain size font.
So the question is, how do I code the page so that it separates the first paragraph from the article and prints it in bold.
As always, thank you folks so much for your constant help.
Tim
This is my current code:
$hostname="someserver.net";
$username="someusername";
$password="somepassword";
$dbname="someusername";
$usertable="sometable";
$id=$_GET['id'];
mysql_connect($hostname,$username,$password) or die(mysql_error());
mysql_select_db("$dbname") or die(mysql_error());
$data = mysql_query("SELECT * FROM $usertable WHERE id=$id")
or die(mysql_error());
$info = mysql_fetch_array( $data );
echo "<h1><p>" .$info['title']. "</h1></p>";
echo nl2br($info['content']);