Im currently trying to build a validation class in PHP.
What im trying to do is match the array of validations required with the $_POST array.
My validation array gives the following values which are field names
$validation[0] = “order[0][company]”
$validation[1] = “order[1][company]”
$validation[2] = “order[2][company]”
And so on.
The $_POST array looks like this
Array ( [order] => Array ( [0] => Array ( [company] => [link] => [username] => [password] => [comments] => ) [1] => Array ( [company] => [link] => [username] => [password] => [comments] => )
How do I access the value from the post array using the field names given above?
I tried $_POST[$validation[0]] but it doesn’t seem to work.