Array question
| From: | Disko_kex | Date: | Mon, 25 Aug 2003 06:58:59 +0000 |
| Subject: | Array question | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-21234@lists.php.net to get a copy of this message | ||
If I have an array like this > [0] => 1 [1] => 2 [2] => 3 ... [99] =>
100
If I want to select [50] => 51 and store the value that's 2 positions
before and 1 position after, how can I do?
If I want to know what position value 71 have?
I have search the PHP-manual and found some functions as prev, next, pos
etc. But with these commands I have to loop thru the array every time to
reach the the values and positions. It has to be an easier way to do it.
// jocke