The following code loops through a multidimensional array, printing the
subject heading and then the strand:

foreach( $strandx as $subjectx=>$strandy )
{
print " <li><b>".$subjectx."</b>.<br />\n";


print " <ul>\n";
asort( $strandy ); // sorts the strands
foreach( $strandy as $str )

{ print "<li>";
checkbox("fstrand[]",$subjectx,$str,0,0);
print "</li>\n";
}
print " </ul>\n";
}
print "</ol>\n";

This is the array so far:
$strandx = array('English' => array('Reading', 'Writing','Oral and Visual
Communication'),
'Mathematics' => array('Number Sense and Numeration', 'Measurement',
'Geometry and Spatial Sense','Patterning and Algebra','Data Management and
Probability'));

I would like to limit the subject and strand being printed based on the
subject selected in a form. So, for example, if "English" is selected in the
form, only the subject name and the strands for English would be published.
Could someone please help me with the code for this.

Many thanks,

Peter Gumbrell
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to