PHP’s alternative syntax and why it’s useful
Thursday, April 16th, 2009PHP offers an alternative way to write their control structures for as long as I’ve remembered. It basically does away with the curly brackets and replaces the opening curly with a colon (:) and the closing with ‘end’-whatever. I have to be honest and say I’ve never really found a need to use the alternative syntax, simply because I’m so used to using the curly braces after so many years of using PHP. Plus, it’s less typing!
But having spend time working on CodeIgniter projects, I have found myself adopting this alternative syntax when it comes to buidling the CI’s views templates. I appreciate that there is place in the PHP universe for this alternative coding style.
There are currently only two books published about Codeigniter available in the market, one is called
Having used Codeigniter for a few months now, this framework is really turning out to be a joy. My last post, I talked about