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 dont even know if I can use the function () to do what I want .. At the moment I have say 20 pages .. the only thing that changes is the query .. I want to beable to create a page as shown below .. adding all 20 querys to the one page .. So its easy to maintain and obviously dont have 20+ pages to deal with.. Then call back any query by just using a link ie: http://www.blabla.com/products.php?action=lawnmower
Am I on the right track .. can function () acheive this?
You need to intake variables within the function's arguments, and then for global variables set within an include or whatever, you need to use global to identify to the PHP parser that you want that variable used within the function.
I am like a total noobie .. and cant make alot of sence of the examples in that link .. well not to intergrate it into what I have .. would someone be kind enough to get it to display one of the variables to get the loop started to help me make some sence of it .. I manage to get a table to display .. but no data displays in the table .. but the $totalEntries count works ..
Well instead of integrating those examples into your script right away, just practice in seperate files so you can better understand the concept of variable scope and how to use it properly.
Then setting up proper variable scope within your script should be a snap.
After some hours and gain of more grey hairs .. lol .. .. I think I have it figured out .. Makes it harder for me to understand when the examples at php.net (php in general) arnt in english .. err as in they use math I guess .. which makes it harder for me personally to figure it out