Xampp doesnt recognize brakets as array

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Xampp doesnt recognize brakets as array

Postby Alejandrom3 » 17. May 2014 19:31

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?
Alejandrom3
 
Posts: 1
Joined: 17. May 2014 19:25
Operating System: Windows 7

Re: Xampp doesnt recognize brakets as array

Postby Nobbie » 17. May 2014 20:34

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!!
Nobbie
 
Posts: 13182
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 136 guests