0

很抱歉打扰这样一个愚蠢的问题,但我正在自学 PHP,但我在基础知识方面遇到了麻烦。

我有以下内容:

$members
: array = 
  0: array = 
    0: string = 19637
    theID: &string = 19637
    1: string = 4GM1  
    Code: &string = 4GM1  
    2: string = MARTIN
    Name: &string = MARTIN

我应该如何在我的代码中表示这一点?

我正在做:

$members = array( array( theID=> "19637", 
              Code => "4GM1",
              Name => "MARTIN"
   ));

但这在调试器中显示如下:

$members 
: array = 
  0: array = 
    theID: string = 19637
    Code: string = 4GM1
    Name: string = MARTIN

非常感谢 !

4

1 回答 1

0

这应该有效:

$members = array(
  array(
         0  => '19637',
    'theID' => '19637',

         1  => '4GM1',
     'Code' => '4GM1',

         2  => 'MARTIN',
     'Name' => 'MARTIN'
  )
);
于 2012-09-05T10:44:41.007 回答