Excluding values of one array from another (sort of)

From: Date: Thu, 03 May 2001 10:49:40 +0000
Subject: Excluding values of one array from another (sort of)
Groups: php.db 
Request: Send a blank email to php-db+get-9084@lists.php.net to get a copy of this message
I have the following code <?php $alphalist = array ("A"=>"A", "B"=>"B", "C"=>"C", "D"=>"D", "E"=>"E", "F"=>"F", "G"=>"G", "H"=>"H", "I"=>"I", "J"=>"J", "K"=>"K", "L"=>"L", "M"=>"M", "N"=>"N", "O"=>"O", "P"=>"P", "Q"=>"Q", "R"=>"R", "S"=>"S", "T"=>"T", "U"=>"U", "V"=>"V", "W"=>"W", "X"=>"X", "Y"=>"Y", "Z"=>"Z"); $exemptlist = array ("Q"=>"Q", "V"=>"V", "X"=>"X", "Z"=>"Z"); reset ($alphalist); reset ($exemptlist); while (list ($val) = each ($alphalist)) { if ($currltr <> $val) { $smlval = strtolower($val); echo "<a href=\"http://www.some.com/page_$smlval.htm\">$val</a>&nbsp;&nbsp;\n"; } Else { echo "$val&nbsp;&nbsp;\n"; } } ?> This a header and footer for a bunch of pages. A quick explanation is... For the page that is displayed don't show the letter as a link. Now what I want to do is show the letters in the $exemptlist as non links as well (because there a no pages for these letters, and yes I still want them displayed) Eventually I will pass the exempt values from the main page so the exempt values will change depending on what I'm doing with the pages. PS I'm new to this so please be gentle 8-) Any one have any ideas? Thanks in advance Howard Picken hpicken@our.net.au ----- STRUGGLIN' ON -----

« previous php.db (#9084) next »