Thread: array.reverse()
View Single Post
  #5  
Old 06-07-2009, 05:03 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Well it can be a shortcut for, for each loops.. like:

PHP Code:

temp
.array = {12345};

for (
temp.= (array.size()-1); 0); temp.i--) {
  echo(array[
i]);
}

for (
temp.val: array.reverse()) {
  echo(
val);

But other than that this usually doesn't pop up much.
__________________
Quote:
Reply With Quote