August 17, 2008
Yes, that does sound like a pointless title. Let me explain the situation, we have a self referential model, Pages, which has child pages and a parent page. Because I’m using CakePHP for this project I have added the Tree Behaviour to the model also which is really handy, but you don’t need that behaviour [...]
March 30, 2008
Moving complex php if statements into ternary statement syntax is not always recommended, but I think it can look quite neat and easily readable. Ternary statements compress your code and using nested ternary statements sparingly in certain situations makes a mess of nested if statements far easier to scan when converted to a nested ternary. [...]
for tips on PHP and web development