访问2D阵列信息 [英] access 2D array info

查看:115
本文介绍了访问2D阵列信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我对编程非常陌生..我有一个2D数组,即A:,它是这样填充的:

A
+0(i)
+0(j)
检查级别
名称
优先级
+1
检查级别
名称
优先级



现在我要访问checklevel元素并检查它是否为1 ....

访问我用过的:
if($ A [i [j]] ["checklevel"] == 1){
...
}

但这给了我null ....

有什么建议吗? :(

Hi ALL,
I am very new to programming..I have a 2D array namely A : and it is filled like this:

A
+0 (i)
+0 (j)
checklevel
name
Priority
+1
checklevel
name
Priority



now I want to access to the checklevel element and check it if it is 1 or not....

to access I used:
if ($A[i[j]]["checklevel"]==1) {
...
}

but it gives me null....

any sugesstion? :(

推荐答案

A [i [j]] ["checklevel"] == 1){
...
}

但这给了我null ....

有什么建议吗? :(
A[i[j]]["checklevel"]==1) {
...
}

but it gives me null....

any sugesstion? :(


您应该使用
You should use


A


这篇关于访问2D阵列信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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