How to solve the problem of symbol error that keeps getting reported?

WBOY
Release: 2016-07-06 13:54:07
Original
1168 people have browsed it

private $_specialWhiteList = [

<code>    'table' =>  'table|tbody|thead|tfoot|tr|td|th'
];
运行时老是报错syntax error, unexpected '['
该怎么解决啊?





</code>
Copy after login
Copy after login

Reply content:

private $_specialWhiteList = [

<code>    'table' =>  'table|tbody|thead|tfoot|tr|td|th'
];
运行时老是报错syntax error, unexpected '['
该怎么解决啊?





</code>
Copy after login
Copy after login

The PHP version is too low, resulting in syntax incompatibility.
Solution 1: Upgrade PHP to 5.4 or above
Solution 2: Replace [] with array()

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!