Am I right that the following syntax works in PHP 5.4 but doesn't work in PHP 5.3?
$users[$key]['class'] = $class->row_array()['name'];
The row_array()
function is a CodeIgniter function which returns an array. I was stumbled when I found out that none of my code worked when I moved it to the live server, this is very frustrating of course because now I'll have to refactor everything.
Can anyone please tell me if this is related to the PHP version and if there is a possible easier solution rather than refactoring everything?