Re: how to find
| From: | Sebastian Mendel | Date: | Thu, 11 Nov 2004 12:45:08 +0000 |
| Subject: | Re: how to find | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-37231@lists.php.net to get a copy of this message | ||
Peppe wrote:
I have numbers in my array 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 or 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 or 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 how can I find the first 1 and the last is there a function for it Regardsarray_search() returns first '1' array_keys() can return all '1's getting the highest or last from the return of array_keys() gives you the last with '1' -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com www.sf.net/projects/phpdatetime www.sf.net/projects/phptimesheet