php - Unexpected '[' - no error on localhost but there is one on server -


this question has answer here:

$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

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -