Programming Techniques
Pages
Home
What does the => operator mean in the following code?
What does the => operator mean in the following code?
$foo = array('car', 'truck', 'van', 'bike', 'rickshaw');
foreach ($foo as $i => $type) {
echo "{$i}: {$type}\n";
}
//Output: 0: car 1: truck 2: van 3: bike 4: rickshaw
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Popular Posts
No comments:
Post a Comment