Shuffle an associative array with PHP

By Josh Sherman
1 min read
development
php

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. It takes a bit more work, but you can randomize […]

New Orleans is more than just Mardi Gras you know

By Josh Sherman
1 min read
reviews
vacation

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 originally going to stay down in Ybor City which is […]

Incrementing / Decrementing a String with PHP

By Josh Sherman
1 min read
development
php

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 -- to accomplish this. Please note that you can’t increment […]

The Pitfalls of Using BuySellAds

By Josh Sherman
5 min read
reviews
advertising
development

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 to use them on a few occasions. As of this […]

Simple Probability Distribution with PHP

By Josh Sherman
1 min read
development
php

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 it. The premise is simple, you assign weights to the […]