插入数组...... [英] Inserting into an array...

查看:65
本文介绍了插入数组......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




如果我有一个[a,b,d]数组并且想要插入c,那么

的方式是什么?


Sonnich

解决方案

2007年3月23日06:30:46 -0700," ; Sonnich

< so ************ @ elektrobit.comwrote:


> Hi

如果我有一个[a,b,d]数组并想插入c,那么
是什么方式?

Sonnich



array_push()

如果你想按字母顺序排序,你总是可以运行排序。

Sonnich写道:





如果我有一个[a,b,d]数组和想插入c,那是什么方式

呢?


Sonnich


testArr = array('''',''b'',''d'');

//在PHP中操作数组的1000种方法之一:

Hi

if I have an array of [a, b, d] and want to insert c, what is the way
then?

Sonnich

解决方案

On 23 Mar 2007 06:30:46 -0700, "Sonnich"
<so************@elektrobit.comwrote:

>Hi

if I have an array of [a, b, d] and want to insert c, what is the way
then?

Sonnich

array_push()

You can always run sort if you want in alphabetic order.


Sonnich wrote:

Hi

if I have an array of [a, b, d] and want to insert c, what is the way
then?

Sonnich


testArr = array(''a'',''b'',''d'');
// one of the 1000 ways to manipulate an array in PHP:


这篇关于插入数组......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆