Category: PHP

WordPress: Passing variables to get_template_part 0

WordPress: Passing variables to get_template_part

I had an issue with a project that needed a simple way to carry variables over to small templates which would make life much easier. I found this solution, I thought i’d expand on...

Quick PHP Function #3: Sorting multi-dimensional arrays by a value within 0

Quick PHP Function #3: Sorting multi-dimensional arrays by a value within

Another useful function im frequently in need of, a multidimensional array sort/order function

Use it the same way you would use asort($arrayname) but with a second argument being the name of the column/key name you...

Quick PHP Function #2 : The User Agent 0

Quick PHP Function #2 : The User Agent

There are lots of ways to grab the browser’s user agent, this is my simple way of doing it, feel free to share your own. This comes with two options, echo the results or...

Quick PHP Function #1 0

Quick PHP Function #1

There are times when I am reusing code snippets from various projects, figured I will post them up on here, they might be useful to at least one person out there. I will start...