ZOMG I think I finally understand hashes

I’m trying to teach myself how to program an SMS application using Twilio’s API. Since I’m not familiar with it, I’m using PHP in order to teach myself a new language (and also since it’s simple and there are a ton of resources). Backup for a second - when I was learning Perl, I had a lot of trouble interpreting and using hashes (also known as associative arrays). Present time again - I’m looking up how to define arrays, and I take a look at some documentation and this book, and what do I see? associative arrays, staring me in the face. And then I realize that associative arrays are similar to our traditional arrays, but the indexes (keys) are whatever you want them to be instead of integers. I think I’ve had that aha! moment. Coding rocks!

<= newer back to blog older =>