Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001051

[PHP-DB] Excluding values of one array from another (sort of) From: Howard Picken (hpicken <email protected>)
Date: 05/03/01

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 <email protected>

----- STRUGGLIN' ON -----

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>