Comunitatea PHP Romania
 

 
array_pop

array_pop

(PHP 4 , PHP 5)

array_pop -- Pop the element off the end of array

Description

mixed array_pop ( array array)

array_pop() pops and returns the last value of the array, shortening the array by one element. If array is empty (or is not an array), NULL will be returned.

Exemplu 1. array_pop() example

$stack = array ("orange", "banana", "apple", "raspberry");
$fruit = array_pop ($stack);

After this, $stack will have only 3 elements:

Array
(
    [0] => orange
    [1] => banana
    [2] => apple
)
and rasberry will be assigned to $fruit.

Avertisment

Această funcție e posibil să returneze FALSE, dar poate returna, de asemenea, o valoare ce poate fi evaluată ca fiind FALSE, cum ar fi 0 sau "". Citește despre tipul boolean pentru mai multe informații. Te rog folosește operatorul === pentru a testa valoarea returnată de această funcție.

See also array_push(), array_shift(), and array_unshift().

Ultimele discutii in forum RSS Forum

Ultimele articole Ultimele articole

Top membri

Pirahna Pirahna
acasa , in pat
carco carco
Bucuresti
Birkoff Birkoff
Bucuresti
Mascka Mascka
Braila
raul_ raul_
whooper whooper
Toronto ON
mihaitha mihaitha
Sibiu
gabysolomon gabysolomon
Bacau
oriceon oriceon
Constanta
garlicinicolae garlicinicolae

Newsletter


Email:
 inscriere
 renuntare
 
 Arhiva newsletter

Parteneriat

Copyright © 2001-2008 PHP Romania Add PHPRomania to Google Add PHPRomania to Del.icio.us Add PHPRomania to Stumbleupon Add PHPRomania to Yahoo! Add PHPRomania to Digg Add PHPRomania to Blink Bad credit loans | Loans | Car Insurance | Work at Home Forums | Problem Mortgage
Ads: Partener Way2Web Nework: gazduire web | inregistrare domenii | web design | imobiliare | web hosting
Powered by Simplis