|
Question : How do I find out if an array has values posted to each of its elements? I need to know that EVERY element has been filled out.Answer :You might like to use a foreach loop, as this would mean that you don't have to know the number of elements in the array:
<?
foreach ($array as $val) {
if (isset($val)) {
// whatever you want to do goes here
}
else {
echo "fill out my form!<br>\n";
}
}
?>
|