search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

Programming Dictionary

Online technical manual for service programmers
Popular searches:
Dictionary homepage Server PHP php array_shift() function
php array_shift() function Detailed instructions for use

php array_shift() function

Chinese translation Recent Updates: 2018-04-18 15:45:25

英[ʃɪft] 美[ʃɪft]

vt.& vi. change; shift gears; remove; get rid of

vt. Change clothes of..., change (clothes); sell , sell; [computer] displace (data)

vi. (car) shift gears; change clothes; muddle through; make a living for oneself

n. Move, transfer, convert; change, change, Transform, replace, replace, swap, make it easier, substitute;

Third person singular: shifts Plural: shifts Present participle: shifting Past tense: shifted Past participle: shifted

php array_shift() function Video explanation

php array_shift() function syntax

Function: Delete the first element in the array and return the value of the deleted element.

Syntax: array_shift(array)

Parameters:

Parameter Description
arrayRequired. Specifies an array.

Description: Returns the value of the element removed from the array, or NULL if the array is empty.

php array_shift() function example

<?php
$a=array(0=>"西门",1=>"灭绝",2=>"无忌");
echo array_shift($a); //输出被删除的 数组元素的值
echo "<br>";
print_r ($a); //打印处理后的数组
?>

Run instance»

Click the "Run instance" button to view the online instance

Output:

西门
Array ( [0] => 灭绝 [1] => 无忌 )


<?php
$a=array(0=>"欧阳克",1=>"无忌",2=>"Peter_zhu");
echo array_shift($a); //输出被删除的 数组元素的值
echo "<br>";
print_r ($a); //打印处理后的数组
?>

Run Instance»

Click the "Run Instance" button to view the online instance

Output:

欧阳克
Array ( [0] => 无忌 [1] => Peter_zhu )
php array_shift() function