You've stumbled across the archive of the blog posts I wrote back in 2014 and prior. Feel free to peruse, through everything from code snippets that never made it to GitHub, to random ramblings about my passion for technology.

var_dump in PHP, by default, prints the results of var_dump to the output in the same way that print would. This prevents us from doing things like echo "Variable 'x' is: " . var_dump($x) . ".";.

To prevent this, we can use the output buffer instead.

Continue reading...

I felt that these three array functions were sorely lacking from PHP. They're simple to use and easy to install, and follow the general syntax of the existing array methods that are default to PHP.

Continue reading...

This code can compare a string to a wildcard, such as "a*c" which would match "abc" or "abbbbbc" or "afiefaififeanfnc" but not "aaa". It can also match "a?c" to "abc" or "a7c" but not "azzc".

Continue reading...

Web development is a lot of trial-and-error. With PHP and JavaScript, most of it is logical; X happens and Y is true therefore Z will happen. But when you get into formatting (like rounded corners, testing column widths, making faux columns and so on), you have to write your CSS formatting code and then test it out. If it's not to your liking, you change it. There's no real logic about it.

Continue reading...