Fixed code to be PHP 5.3+ compatible, using array() instead of [ ]