Wednesday, 11 September 2013

How to solve the parse error in PHP 5.2

How to solve the parse error in PHP 5.2

How to replace the following code to work on PHP 5.2. The below code
generates a Parse error: syntax error, unexpected T_FUNCTION
$list = array('0' => 'No Activity', '1' => 'Pending','2' => 'Approved',
'3' => 'Rejected', ''=>'All');
'value'=>function ($data, $row) use ($list){ return $data->test=
$list[$data->Test] ; },

No comments:

Post a Comment