Remembering syntax patterns through context

Speaking of array functions in PHP, ExpressionEngine developer Derek Jones shares a trick for remembering which order to send your arguments in when using various php search functions.

All array-related functions use needle, haystack and all string-related functions use haystack, needle.

There are certain words in the english language which no matter how many times I spell or use them, I always have to pause and wonder if I got it right. The best way to conquer such elusive patterns is by placing them in context. Derek does a nice job of illustrating the context for these PHP search functions.

Post a Comment

Your email is never published nor shared. Required fields are marked *

You can follow any discussion on this article with the RSS feed for this post.

About this article

Green Galoshes is a weblog written by Justin D. Henry. This entry was published on or around February 7, 2008.

Categories & Tags

This article is filed under code, reference. It is further described as , , , , , , , , , .