PHP makes it really easy to randomize the order of an array with the shuffle() function. If you’ve ever used this function on an associative array you know that the array will be randomized, but the keys will be dropped.…
I’m definitely starting to think so at this point. If you’re not aware, last week our house was tented for termites and we took a mini vacation to New Orleans. What most don’t know is that this tenting was over…
In the past, we’ve discussed incrementing and decrementing a variable and incrementing and decrementing a number by another number but did you know that we can also increment and decrement a string? You can use the shorthand operators ++ or…
Blogging from the French Quarter in New Orleans today. A recent bout of termite infestation has left us with a circus tent full noxious gas enclosing our house and no place to call home for a few days. We were…
We’ve all been there, trying to juggle two or more things for either split testing or just because you want some variety. This came up recently for me with juggling advertising networks and I wrote some simply code to handle…
BuySellAds (BSA) is a platform for selling advertisements on your website. They take a mere 25% cut of sales and offer you a marketplace listing to help you gain exposure to potential advertisers. I love the idea and have attempted…
We’ve previously discussed how to simply increment and decrement a variable but that only covered incrementing by a value of 1. What about when you want to increment a variable by 5s? There’s a few different ways this can be…
Recently a former coworker of mine sent out an email to her LinkedIn network pleading with us to leave her a thoughtful recommendation instead of just endorsing her for skills. Unfortunately, I never worked directly with her at the job…
One of PHP’s most powerful data types is the array. It can hold numbers, it can hold letters, it can be sorted, sliced and chunked. Speaking of sorting, when sorting an array the straight forward sorting functions are only for…
I’m not referring to the complexity of the permalink or slug itself, but the complexity to your code that can be introduced with certain formats, specifcally anything that the user can modify. When I was originally building SceneKids.com I wanted…