php - Unexpected '[' - no error on localhost but there is one on server -
this question has answer here:
- php parse/syntax errors; , how solve them? 12 answers
$query_var[] = '`'.array_keys($activefilters)[$i].'` concat(\'%\',:'.array_keys($activefilters)[$i].',\'%\')';
parse error: syntax error, unexpected '['
so following line generates error in xampp apache server on localhost error isn't occurring. on server there error
$query_var = [];
but changed $query_var = array();
, error wanst appearing unexpected [
i sure has php version or that
correct, php version issue of php 5.4 can use
$query_var = [];
http://php.net/manual/en/migration54.new-features.php
so host running older php version.
Comments
Post a Comment