Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.php

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 03-02-2010, 09:39 AM
gina
Guest
 
Posts: n/a
Default take out the last entry in array

Hello.

I need to keep everything but cut off the last entry of an array ...

how can I achive this, please ?

Gina
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 03-02-2010, 09:50 AM
Jerry Stuckle
Guest
 
Posts: n/a
Default Re: take out the last entry in array

gina wrote:
> Hello.
>
> I need to keep everything but cut off the last entry of an array ...
>
> how can I achive this, please ?
>
> Gina


See http://www.php.net/manual/en/function.array-slice.php.

Also possible: http://www.php.net/manual/en/function.unset.php

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote
  #3 (permalink)  
Old 03-02-2010, 09:51 AM
David Bolt
Guest
 
Posts: n/a
Default Re: take out the last entry in array

On Tuesday 02 Mar 2010 10:39, while playing with a tin of spray paint,
gina painted this mural:

> Hello.
>
> I need to keep everything but cut off the last entry of an array ...
>
> how can I achive this, please ?


$array=array_slice($array,0,-1);


Regards,
David Bolt

--
Team Acorn: www.distributed.net OGR-NG @ ~100Mnodes RC5-72 @ ~1Mkeys/s
openSUSE 11.0 32b | | | openSUSE 11.3M1 32b
openSUSE 11.0 64b | openSUSE 11.1 64b | openSUSE 11.2 64b |
TOS 4.02 | openSUSE 11.1 PPC | RISC OS 4.02 | RISC OS 3.11

Reply With Quote
  #4 (permalink)  
Old 03-02-2010, 09:57 AM
gina
Guest
 
Posts: n/a
Default Re: take out the last entry in array


"gina" <gingingina@googlemail.de> schrieb im Newsbeitrag
news:hmipt2$n2a$00$1@news.t-online.com...
> Hello.
>
> I need to keep everything but cut off the last entry of an array ...
>
> how can I achive this, please ?
>
> Gina


Thanks a lot for your help!!!

Reply With Quote
  #5 (permalink)  
Old 03-04-2010, 09:09 PM
Michael Fesser
Guest
 
Posts: n/a
Default Re: take out the last entry in array

..oO(gina)

>I need to keep everything but cut off the last entry of an array ...
>
>how can I achive this, please ?


array_pop()

Micha
Reply With Quote
 
Reply

Popular Tags in the Forum
array, entry

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: array? Paul Dorfman Newsgroup comp.soft-sys.sas 0 09-24-2009 06:48 PM
Re: array? oloolo Newsgroup comp.soft-sys.sas 0 09-24-2009 06:12 PM
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing Data Entry Outsourcing Newsgroup comp.soft-sys.sas 0 03-20-2008 12:00 PM
Re: MAX of _TEMPORARY_ array? Venky Chakravarthy Newsgroup comp.soft-sys.sas 0 06-27-2005 09:19 PM
ODS GRAPHICS with PROC LIFETEST Daixin Newsgroup comp.soft-sys.sas 1 10-28-2004 04:29 PM



All times are GMT. The time now is 06:47 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.