change:
$data = [];
to
$data =array();
As of PHP 5.4 you can also use the short array syntax, which replaces array() with []. So its only with 5.4 and later
More Related Contents:
- Please rectify this syntax error echo ” ” Add to cart “”; [closed]
- PHP parse/syntax errors; and how to solve them
- How do I get PHP errors to display?
- Laravel: Error [PDOException]: Could not Find Driver in PostgreSQL
- Notice: Trying to get property of non-object error
- PHP expects T_PAAMAYIM_NEKUDOTAYIM?
- calling function inside preg_replace thats inside a function
- Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ [duplicate]
- Constant expression contains invalid operations [duplicate]
- Parse error: syntax error, unexpected ‘(‘, expecting ‘,’ or ‘;’ in
- mysql error ‘TYPE=MyISAM’
- header of php not working btw html? [duplicate]
- have index.html and action.php on same folder(public_html) on cpanel on submiting the form it is showing as requested URL was not found on the server [closed]
- Finding the number of days between two dates
- How to get multiple selected values of select box in php?
- Best way to get result count before LIMIT was applied
- Why can’t I access DateTime->date in PHP’s DateTime class?
- Is there a built-in way to get all of the changed/updated fields in a Doctrine 2 entity
- PHP DOMDocument errors/warnings on html5-tags
- Best practices to test protected methods with PHPUnit
- What’s the disadvantage of mt_rand?
- How to compress/decompress a long query string in PHP?
- Crop or mask an image into a circle
- How to get ¤ to display literally, not as an HTML entity
- How to downgrade or install a specific version of Composer?
- Removing black borders 4:3 on youtube thumbnails
- Guzzle 6: no more json() method for responses
- Regular expression preg_quote symbols are not detected
- Interpreting return value of function directly as an array
- prepared parameterized query with PDO