Re: array
| From: | afan | Date: | Fri, 01 Dec 2000 00:02:06 +0000 |
| Subject: | Re: array | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4203@lists.php.net to get a copy of this message | ||
Thank you very much Chris, but actually I was looking for this:
array array_slice (array array, int offset [, int length])
Thanks!
----- Original Message -----
From: "Boget, Chris" <Chris.Boget@wild.net>
To: "'afan'" <afan@sprout.net>; <php-windows@lists.php.net>
Sent: Thursday, November 30, 2000 12:52 PM
Subject: RE: [PHP-WIN] array
> > As a beginer i PHP, I have "simple" problems with array:
> > Let's say:
> > $Arr = array (a1, a2, a3, a4, a5, ..., a23);
> > echo "$Arr[4]"; - prints 4th element of array
> > But, how can I print only elements, e.g. from 8 to 12? Or,
> > from 15 to the end?
>
> $startingElement = 8;
>
> for( $i = $startingElement; $i < count( $Arr); $i++ ) {
> echo $Arr[$i];
>
> }
>
> Chris
>