Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello all!
1st, the easy one:
When writing a post, how do you display code highlighted in different colors? is it something to do with the hightlight_string() function? I had a quick search but couldn't find it.
2nd, bonus question...
Anyone familiar with POG? It writes an easy to use (well, for most; I'm fairly new at this!) databases?
Anyways, I have a table in a database named 'SS', each object when entered as two attributes: 'title', and 'story'. I'm using GET to retrieve the story body from a list of titles, and have it display to the right of the list (an html anchor posts the GEt info, it all works fine):Code: Select all
<?php
$currentitle = $_GET['currentitle'];
$item = new SS();
$calleditem = $item->GetList(array(array("title","=", $currentitle )));
if ($_GET['currentitle'] == "") {
echo"<p>nothing clicked yet</p>";
}else {
echo "<h1>the current title is $currentitle->title</h1>";
echo "<p></br></br>$calleditem->story</p>";
}
?>Tom
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]