php-db | 2001051
Date: 05/03/01
- Next message: Johannes Janson: "Re: [PHP-DB] Mystery variable query?"
- Previous message: Dan Eskildsen: "Re: [PHP-DB] mysql/php select using date in where clause"
- In reply to: Howard Picken: "[PHP-DB] Excluding values of one array from another (sort of)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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=\"http://www.some.com/page_$smlval.htm\">$val</a> \n";
>
> } Else {
>
> echo "$val \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>
>
-- 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>
- Next message: Johannes Janson: "Re: [PHP-DB] Mystery variable query?"
- Previous message: Dan Eskildsen: "Re: [PHP-DB] mysql/php select using date in where clause"
- In reply to: Howard Picken: "[PHP-DB] Excluding values of one array from another (sort of)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

