Re: Weird nested while loop problem
| From: | Darryl Friesen | Date: | Wed, 17 Jan 2001 22:33:17 +0000 |
| Subject: | Re: Weird nested while loop problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35185@lists.php.net to get a copy of this message | ||
Getting off topic maybe so I'll keep it short.
> The array pointer can be pretty useful.
True, but unexpected for the perl programmer/novice PHP geek.
> ie. give me the second last element of an array:
This can be done in perl ("standard" arrays) with $array[@array-2]
> Or have it tell you what the index is at the second last element:
> and the index before that one:
Not sure of a way (if any) to do that with perl's associative arrays. Chalk
one up for PHP.
Once I got a handle on the differences between perl and php arrays (perl has
two types; php just has one that works like a combination of both of perl's)
I was OK.
- Darryl
----------------------------------------------------------------------
Darryl Friesen, B.Sc., Programmer/Analyst Darryl.Friesen@usask.ca
Education & Research Technology Services, http://gollum.usask.ca/
Department of Computing Services,
University of Saskatchewan
----------------------------------------------------------------------
"Go not to the Elves for counsel, for they will say both no and yes"