Link to test case:
https://editor.datatables.net/examples/advanced/cascadingLists.html
Debugger code (debug.datatables.net):
<?php
// DataTables PHP library
include( "../lib/DataTables.php" );
$values = $_REQUEST['values']['team.continent'];
if (! $values) {
echo json_encode( [] );
return;
}
$countries = $db
->select( 'country', ['id as value', 'name as label'], ['continent' => $_REQUEST['values']['team.continent']] )
->fetchAll();
echo json_encode( [
'options' => [
'team.country' => $countries
]
] );
Error messages shown:
Parse error: syntax error, unexpected '[', expecting ')' in \web\Editorphp\controllers\countries.php on line 8
Description of problem:
https://editor.datatables.net/examples/advanced/cascadingLists.html
Editor. dependent ('team. content ','../../controllers/countries. php ') in; This countries.php cannot be executed in a lower version of PHP (PHP 5.3). How can I modify this code so that it can be executed in PHP 5.3?
Thank you so much