PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm trying to write a code to create a menu from a database. The code is supposed to find the 'page_name' which is the menu name and then loop through all existing "sections" of that menu (appetizers, salad, soup...), then loop through each section to find the food items.
I guess what I envision in the end is I have a 'menu' function where I can put wherever I want that section to appear. ex: menu(dinner,salad) and the dinner salad will section appears.
After a few days of going crazy over this, I think my code just stopped making sense.
rafaell wrote:After a few days of going crazy over this, I think my code just stopped making sense.
That is an understatement. You should get a PHP book or take a PHP class because you do not understand the basic syntax.
Yes! this worked. Well, the top half did everything. I don't think I'll need the second half for the before/after. Wherever I insert the create_menu function, it does the job.
I am definitely still learning, and have a few books, but I am mostly learning by trial and error. Sometimes things seem more complicated in my head then it actually has to be.
rafaell wrote:After a few days of going crazy over this, I think my code just stopped making sense.
That is an understatement. You should get a PHP book or take a PHP class because you do not understand the basic syntax.
Yes! this worked. Well, the top half did everything. I don't think I'll need the second half for the before/after. Wherever I insert the create_menu function, it does the job.
I am definitely still learning, and have a few books, but I am mostly learning by trial and error. Sometimes things seem more complicated in my head then it actually has to be.