Page 1 of 1

Xampp doesnt recognize brakets as array

PostPosted: 17. May 2014 19:31
by Alejandrom3
Well my problem is, when i write something like:

$array = ["user" => "User1", "pass" => "1234"];

Dream weaver put it as like there is an error, so i cant use brakets to make array, however if i change it like this:

$array = array("user" => "User1", "pass" => "1234");

its everything ok, but i need to use brakets for some framework im working on.

Anyone knows if its xampp config or dreamweaver config problem? Or how i can solve it?

Re: Xampp doesnt recognize brakets as array

PostPosted: 17. May 2014 20:34
by Nobbie
Alejandrom3 wrote:Anyone knows if its xampp config or dreamweaver config problem? Or how i can solve it?


It cannot be a Xampp problem (whereas i did not understand it fully due to very spare comment), as Xampp delivers PHP (an original and real PHP version) and a syntax error is a syntax error, there is no configuration option to make a syntax error not to a syntax error.

So whatever is going wrong - it is dreamweaver (which does not come with a PHP interpreter).

P.S.: Why cant you use

Code: Select all
$array = array("user" => "User1", "pass" => "1234");


If your "framework" does not work with this basic and fully correct PHP code, you should trash it!!