0
`I get this error

Parse error: syntax error, unexpected variable "$nav"

and here is this php code

 include_once "views/navigation.php";
 include_once "views/side-navigation.php";
 include_once "classes/Page_Data.class.php";

 string $nav = "";
 string $info = "";

 $pageData = new Page_Data();

 what is wrong with the string $nav = ""; syntax?

  I have no idea whats wrong i tried deleting it and the same error goes to the next instance of the variable


 I tried adding space, I tried removing the string , I tried using '' 

Nothing worked, this code is from a programming book, he said he wanted to assign default values for    $nav , and $info variables to provide a holder for future information.

What am I doing wrong?`

sihanat
  • 1
  • 1

0 Answers0