Right now my pages look something like this:
if($_GET[\'something\'] == \'somevalue\')
{
$output .= \'somecode\';
// make a DB query, fetch a row
PDO error exception handling for queries, and really all code should be run through:
try{
}
catch{
}
finally{
}
The reason for this, is it makes debugging much easier when you can pinpoint roughly where in lengthy scripts an error is occuring
more info here: http://php.net/manual/en/language.exceptions.php