Hey everyone! (First post, yeah! 😛)
I just have a simple (i'm sure) question... I'm building a basic script to handle some errors for a form I'm creating, and I'm trying to figure out exactly how to do it.
What I'm trying to do is figuring out if my error variable ($errors) can have information dynamically added to its array. I know that you can add information to an array on the fly by simply typing something like $errors[1] = "ERROR NUMBER 2"; but I can't find it possible (well it would be, but it'll require increment values to variables) to add multiple errors to the same array without having to specify which position in the array ([1], [2], [3], etc...).
Basically I'm wanting the $errors variable to contain ANY and ALL of the errors that may be generated by the form verification script. Once I can figure that out its smooth sailing as I'll just do a foreach statement to spit back out the information.
I hope you understand what I'm getting at and I'm sure it's possible. Any help would be great.
Thanks!