Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82543

Editor. dependent ('team. content ','../php/countries. php ') for cascading tables; Unable to execut

$
0
0

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 D:\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


Viewing all articles
Browse latest Browse all 82543

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>