ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I'm a newbie learning PHP, trying to write a dynamic menu bar. I am getting stuck on a parsing error "Parse error: syntax error, unexpected '{' in /home/karensga/public_html/Inc/KGDmenu.php on line 14". I have matching {} on all the FORs and IFs, but i must be missing something. I'm using Quanta+ 3.5.9 to write my code. Any help would be greatly appreciated.
I'm calling the file "Inc/KGDmenu.php" from my home page with
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
I recommend to use an editor which shows you matching parenthesis/braces. Quanta and Kate do automatic highlighting, joe does it with a key combination, and I assume vi and vim have that functionality as well.
ya, vim does show it (as long as it's on the same visible page of the screen not sure how it works in gvim)
as you say you're new to php (coding in general? ),
one good thing to learn from early on is good line indention, also helps a lot with
reading it and finding errors quicker (unless it's just the forums here screwing up the indentions in above php block
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.