I have this code:
menu.php
<?php $menu = [ [ "id"->"home", "name"->"Home page", "url"->"/index.php" ] }; ?> index.php
<?php require 'menu.php'; $menubar = [ "menu" -> $menu, "current" -> "home" // this line ]; ?> <!-- and some html --> And, of course, it isn't working.
Parse error:
syntax error, unexpected '"home"' (T_CONSTANT_ENCAPSED_STRING), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in D:\xampp\htdocs\index.php on line 11`
How to repair this?