This is the website of Andy Carter a PHP and jQuery web developer in the Steel City. Working with CakePHP (and a bit of Textpattern and Drupal too).

Latest Entries

Handling z-index

#

Neat approach to intelligently handling CSS z-indexes using a CSS preprocessor. The suggestion of using a Sass map is particularly good.

Generating a downloadable CSV file in CakePHP seems to be a bit of a stumbling block for many relatively new to using Cake. It doesn’t need to be challenging. There’s just a few basic steps you need to put in place.

As an example we’ll consider a Subscriber model that contains contact details of people who have subscribed to our app. We want to create a CSV export of all the subscribers data.

Hack: a new programming language for HHVM

#

Facebook have released a new programming language based on PHP called Hack. Basically it appears to work much like PHP, but with static typing.

Today we’re releasing Hack, a programming language we developed for HHVM that interoperates seamlessly with PHP. Hack reconciles the fast development cycle of PHP with the discipline provided by static typing, while adding many features commonly found in other modern programming languages.

Looks interesting. Although I’m not all that keen on the name.

Sass 3.3 Maptastic Maple

#

Sass 3.3 was released the other day and came with loads of new features. This is a good look at the main ones including map data structures and source maps.

Featured Entries

Calculate a Person's Age in PHP (Accounting for Leap Years)

I've seen a lot of code out there for calculating a person's age that makes the mistake of ignore leap years. If you ignore leap years then the age will be out by a day or more on or around the person's birthday which isn't what you want.

Latest Tweets

Follow Me