« 全部省份城市数据库今天我生日. »

PHP 数组添加一个元素

方法有两个

$stack = array("orange", "banana");

1.

array_push($stack, "apple", "raspberry");

2.

$stack[]="xx";

合起来用就是这样..

$stack = array("orange", "banana");
array_push($stack, "apple", "raspberry");
$stack[]="xx";
print_r($stack);

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

网站目录

最近发表

最新评论及回复

文章归档

Search

Powered By Z-Blog 1.8 Terminator(beta) Build 71218 Designed by Michael

Copyright 0-9999 subin.org.cn Rights Reserved. 晋ICP备08000685号