On Sat, 11 Sep 2004 03:11:08 -0700 (PDT), Mag <[EMAIL PROTECTED]> wrote:
> 
> --- John Holmes <[EMAIL PROTECTED]> wrote:
> 
> > Mag wrote:
> >
> > > Hi,
> > > I will be getting input from a textarea and then I
> > am
> > > using "explode" to break the text into an array
> > when
> > > it encounters a space.
> > >
> > > eg:
> > > one two three four ninty
> > > would be broken into 5 parts of an array.
> > >
> > > ** The array would then be put into a session **
> > > now I need to display the last part (which would
> > be
> > > "ninty" using the above example) then take out the
> > > last part from the array then echo the next last
> > part
> > > (which would be "four") then take out the last
> > part
> > > (using unset? ) etc etc so I have something like:
> > >
> > > Displaying Array :
> > > ninty
> > > (deleteing ninty)
> > > four
> > > (deleteing four)
> > > three
> > > (deleteing three)
> > > etc
> > >
> > > I have been reading the manual and have come this
> > far,
> > > then I think I have to use the array splice
> > function..
> > > Am totally confused, any help, links, tutorials,
> > > pointers, tips or code would be appreciated.
> >
> > Why not just use array_reverse() and then print them
> > out in order using
> > foreach?
> >
> > --
> >
> > ---John Holmes...
> 
> Hello John,
> The reason is I am trying to "chain" some programs,
> the idea is to take the first part (in the original
> example "ninty", then redirect to the second script
> passing that value...after the second script finishes
> it redirects back to the first script which will pass
> the second value (which would be "four") which would
> be be passed to the second script etc
> 
> I think the main part which is confusing me is how I
> can take out just certain "used" parts of the array in
> the $_SESSION array...ideas?
> 
> Thanx,
> Mag
> 

I guess you're looking for array_pop(), it pops the last element off
the end of the array. Look it up in the manual to convince yourself.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to