I’ve created a menu, a drop down menu. It fetches data from an Mysql databse in date order.
When I put the code on my webserver (hosting) it works beautifully.
When I try it locally on my WAMP server it produces an error.
Connection to database works fine so I show you only the problematic part of the code:
Wamt generates the following error message: ’ Notice: Undefined offset: 0 in C:\wamp64\www\bootstrapsite\index.php on line 33.
Now, line 33 is the line that begins with ‘echo’.
What shall I make of this? All input is appreciated.
Well, i have no idea how this code would work correctly on your webserver.
Unless you have a column in your table called 0, $row[0] does not exist in an associative array. (and even if you did, i’m not sure that php would find $row[0] and not expect you to look for $row["0"]…)