This is not a long lists of whats and what-not-to-do when using the forloop syntax in php. It's just a tip I got from official php doc. For the following example, take note of the count() method: Sometimes, It's a common thing to many php developers to iterate through arrays like in the example below. 'toyota', 'salt' => 856412), array('name' => 'ford', 'salt' => 215863)); for($i = 0; $i