Coding ConventionsOr stuff I d …

Coding Conventions

Or stuff I do when programming.

This is PHP orientated but applies elsewhere too.
I like to code using classes, and the functions in those classes for the most part return true or false. If a function returns false, then an internal variable, $this->error gets the error message set by the function.

When I’m working on forms, my validation function returns true or false, but $this->error is an array indexed by form elements which allows me to define a per-element error message that my printForm() function can use.
On the same subject, I populate a single array with form elements which makes it easier to walk through those elements.

Annova newsLawyer kicked out o …

Annova news

Lawyer kicked out of court for ‘flashing her cleavage’The lawyer told the Edmonton Sun: “My V-neck is certainly form fitting, but it isn’t exposing my breasts. I’ve worn it so many times I’m embarrassed to say.”

Tracy Emin lost cat posters vanish amid quick profit hopes – She’s an artist and people hoped to make up to £500 on each poster!

England fan plans 14,500 mile camper van trip to World Cup