Posts Tagged ‘beginners’

Ternary Expression in PHP

November 20th, 2006

After posting on Sitepoint PHP Community Forums again after a long while, I’ve come across some posts which ask what the php code snippet means:

$id = isset($_GET['id']) ? $_GET['id'] : false;

This php code block is called a Ternary Expression. It’s a shortcut for:

if ($_GET['id']) {
$id = $_GET['id'];
} else {
$id = false;
}

» Read more: Ternary Expression in PHP

Frustrated about learning PHP on your own?! I can relate…

May 4th, 2006

Having learnt how to program in a couple of server side languages (ASP1 and PHP) on my own, I must say it had been a very bumpy ride. Lots of mistakes, lots of spaghetti code, lots of questions which the “experts” answered “RTFM” to and lectured you about googling first then asking later instead of “wasting their time” (do I sound bitter? Well I kind of am) .

One small but important lesson that I’ve picked up from my sojourn toward “Professional Web Developerdom” is that it’s not really a matter of intellect in this age of Information Technology, but more a test of patience and attention to detail.

» Read more: Frustrated about learning PHP on your own?! I can relate…