Jan 21, 2009 23:13
1. Grab the book nearest you. Right now.
2. Turn to page 56.
3. Find the fifth sentence.
4. Post that sentence along with these instructions in your LiveJournal.
5. Don't dig for your favorite book, the coolest, the most intellectual. Use the CLOSEST.
I'm not exactly sure how code counts in counting sentences, but:
To loop over an array, accessing both key and value, use:
foreach ($array as $key => $value) {
// ...
}
Programming PHP, 2nd Edition, by Rasmus Lerdof, Kevin Tatroe, and Peter MacIntyre. Only book on my desk at the moment.