Hello,
I am having problems again using a variable variable (or what I think that is) on an object. For instance, this works:
$name = new field("required");
Therefore,
$name->required == true;
Now I have a posted array, that holds all the names (as keys) for each of the objects.
For instance:
foreach($_POST['line'] as $key=>$value) {
if($key->required) {
.. validate ..
}
}
For some reason $key is not translating to "name" (or any other object for that matter)
Now if, for debugging purposes, I put a die command in the foreach, like:
die("Key is: " . $key);
It shows up as:
Key is: name
Grateful in advance,
David.