Re: Excluding values of one array from another (sort of)

From: Date: Thu, 03 May 2001 16:01:09 +0000
Subject: Re: Excluding values of one array from another (sort of)
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9100@lists.php.net to get a copy of this message
Hi Howard, you 'd love the in_array() function (>= PHP4). So you should add an extra condition to your if statement: (see below in code) > <?php > [...] > reset ($alphalist); > reset ($exemptlist); > > while (list ($val) = each ($alphalist)) { > // pay attention! if ($currltr <> $val && !in_array($exemptlist)) { // attention end :) > > $smlval = strtolower($val); > > echo "<a > href=\"s~ Mvf<=íæ*˜¦ > Ê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 ----- > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#9100) next »