Tag Archives: PHP
PHP – Sort a Multi-dimensional Array by Value for a Key

PHP – Sort a Multi-dimensional Array by Value for a Key

Here’s a problem I’ve run into a time or two with sorting arrays. I had a multi-dimension array that I needed to sort on a the values for a specific key (“name” in this case). This array is similar to what you would get back from a mysql database query when you use ARRAY_A to [...]

Read full story Comments { 1 }
php

OOP PHP: What is the Double Colon in Objects/Classes for?

I happen to be the only PHP programmer that I know, so it’s hard to ask your buddy what the heck that :: is used for in some OO PHP programs.  I know you could post it on a forum and get the answer, but I never did.  And Google wasn’t really forth coming when [...]

Read full story Comments { 8 }
ASP.net

ASP.Net C# – PHP Equivalents

On this post, I will be collecting ASP.NET C# commands that I use frequently in PHP but I have to continually look up in the little bit of ASP.NET that I do.  PHP can be frustrating for its inconsistencies in syntax, but what is even more frustrating is when you’re trying to do something in [...]

Read full story Comments Off

PHP: Using Switch to test Multiple Conditions

Ok, so maybe this is common knowledge, but I still felt a little clever when I figured out this trick.  The situation was that I wanted to test a bunch of different conditions to figure out which time category a date falls into.  It would be fairly simple to do with a bunch of if…then…else’s, [...]

Read full story Comments Off