Fork me on GitHub

Tag: array

Tag Archives: array

Quickly unserialize PHP array data in TextMate

Every once in a while I need to see what’s hiding in a serialized array in a database field and finally just wrote a little TextMate command to do the job for me. If I’m already working in that area of code its easier to just dump it someone in the page output to read […]

August 28, 2009 | PHP Scripting | 3 comments

Use array_merge to reorder arrays

This one is pretty fun. Well, at least I think it is. I was working with jQuery UI Sortables the other day and getting the reordered elements from jQuery back in to PHP for reordering via Ajax I ended up with an array whose elements matched the array keys of the array that I needed […]

August 21, 2009 | PHP Scripting | 1 comment

Sort arrays by key revisited

I don’t know why but I have an infatuation with little utility functions. Its pretty stupid, but it keeps me entertained and provides me with a cheap blog post 😉 That and I’ve noticed it trending A LOT in my search keywords lately, so I figure I should post some updated and easier to use […]

July 29, 2009 | PHP Scripting | Comments Off on Sort arrays by key revisited

PHP: Sort Multidimensional arrays by key

Update 2009-07-29: This code has been updated and posted here: Sort Arrays by Key Revisited. So, I had to do some array sorting this week and finally bit the bullet and wrote a class to handle it. If you’ve got the need to sort a multidimensional array by a sub-array key then this might be […]

November 8, 2006 | PHP Scripting | Comments Off on PHP: Sort Multidimensional arrays by key

MySQL Abstraction update…

Yep, the script needed updating already. I left out a routine in the arrayAssoc and arrayNum functions to account for an empty result set. So if you’ve downloaded it, grab this new version here. Did anyone actually download and use the first one?

June 24, 2005 | PHP Scripting | 3 comments