I am working on a app at the moment, as practice mostly. But I have like 25 $vars that accumulate over the course of like 2 pages of forms gathering information. On the final page i use all these $vars to put together an estimate. My question is:
Is there a "common best practice" for handling them? like right now i just have a great big list at top of my pages. Should i use an includes file for $vars? Or use sessions to carry them all around until i am ready to pull them all in for my calculations on the final page?
Jump to Post
I don't think there is really a best practice for handling variables. It really depends on the scope requirements of the variables.
If you prefer to work with many individual variables than continue to use $var1, $var2, etc etc.
If you don't like having so many loose variables, you …
All 2 RepliesReply to this topic
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.