Posts Tagged ‘array’

Fluent Arrays and Strings in PHP

Monday, June 23rd, 2008

I’ve been working some with jQuery and Ruby lately, as you might know they both have very neat fluent interfaces for writing short and easily understandable code. Especially Ruby’s array and string handling should be something that can be done in PHP so I started googling for something nice but so far the best I’ve been able to find is pooQuery. Update: Apparently pooQuery really is a joke (see the comments at the bottom of this post), anyway here is an example from it of how fluent stuff can go too far: ... Read More

Sorting 2D-arrays in PHP – anectodes and reflections

Sunday, January 6th, 2008

Update Aug 4, 2008: The below 2D sorting stuff has been superseded by the sorting section in the fluent article. The below example should be seen as something merely anecdotal and not be taken as a good example of how to sort 2D arrays by column. Alternatively, if you’re fine with a really simple approach see the end of the below article.... Read More