Layout with fixed header and independently scrolling columns

By Josh Sherman
3 min read
development
css

Update April 4th, 2019 Seems at some point between May of 2015 and now, the code in this post went terribly stale. It wasn’t working in either Firefox or Chrome and I’ve since updated the code with a working example. Many thanks to everybody that blew up my comments about […]

Working with Dynamic variable names a/k/a Variable variables in PHP

By Josh Sherman
1 min read
development
php

Variable variables are one of my favorite things about PHP. PHP allows you to use a variable to reference another variable. This comes in exceptionally handy when you need to create variable names dynamically: $variable = 'This is my variable'; $var = 'variable'; echo $$var; Let’s say you have you […]

Open Challenge: Learn Lisp with Me

By Josh Sherman
2 min read
development
autodidacticism

Starting on May 1st, 2015, I am setting out to learn Lisp because I feel like I’m missing out by not knowing it. I see it come up pretty regularly, it’s stood the test of time and there are a plethora of dialects. I am going to target Common Lisp […]

Get all defined variables in PHP

By Josh Sherman
1 min read
development
php

I’ve never actually used this function, but could definitely see using it to help profile a system and/or to help identify defined but unused variables. To obtain an array of all of the defined variables you would: $defined = get_defined_vars(); The function returns a multi-dimensional array of all of the […]

Working with JSON in PHP

By Josh Sherman
1 min read
development
php

JSON is one of my favorite human readable formats. It’s widely used and has great support in PHP as well as other languages. PHP allows you to easily convert variables into JSON and JSON into objects or arrays. First, let’s take a look at how we can convert an array […]