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 […]

Handling click and touch events on the same element

By Josh Sherman
2 min read
development
javascript
user experience

I’m starting to feel behind the curve. I started receiving feedback that some clickable elements on my social networks were not working on touch devices. Without much thought, I went ahead and added touchstart along side of click to bind both events: $(document).on('click touchstart', '.feeny', function(e) { alert('Believe in yourselves. […]

Truncate string with ellipses with PHP

By Josh Sherman
2 min read
development
php

We previously discussed how to calculate the length of a string in PHP and I made mention that using that function is how you would go about truncating a string if it’s over a specific length. I also said that down the road I would discuss the topic at hand, […]

Staying motivated with streaks

By Josh Sherman
2 min read
productivity
inspiration
motivation
goals

I’m having one of those weeks where I zero motivation to sit down and write a blog post. Spent part of the week in Austin with the work fam. Haven’t even unpacked yet. Still getting back into the swing of being at home. In the middle of a major redesign […]

Get date for Easter in PHP

By Josh Sherman
1 min read
development
php

All the good things about Easter aside, it’s one of those holidays that’s a pain to get the date for. This is because the date of Easter is based on the lunar cycle and Spring Equinox (March 21st). The date of Easter on a given year could fall between March […]