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.

One Comment