how would i do that?
This is the full code
PHP Code:
if (!empty($_POST['predminutes1'])){
$keys1 = array_keys($_POST['predminutes1']);
if (!empty($_POST['predplayer1'])){
$keys2 = array_keys($_POST['predplayer1']);
$diff = array_diff($keys1, $keys2);
if(count($diff) > 0) {
eval(print_standard_error('error_invalidpenalty1'));
}
}
}
Of course this is getting messed up since I am getting all the empties in $keys1 which only has 2 values
Here is a print out of results. First line is $keys1 second is $keys2 and third is $diff
PHP Code:
Array ( [0] => 0000000031 [1] => 0000000032 [2] => 0000000033 [3] => 0000000034 [4] => 0000000035 [5] => 0000000036 )
Array ( [0] => 0000000034 [1] => 0000000036 )
Array ( [0] => 0000000031 [1] => 0000000032 [2] => 0000000033 [4] => 0000000035 )
All I want to say is that if the textbox($keys1) next to a checkbox($keys2) is empty (both have the same $playerid as key), eval the error.