Cakephp:如何检索数组中的特定行

时间:2012-06-15 09:34:29

标签: cakephp

大家好我在下面有我的数组,我想检索两行:as programme_code => programme_name

我的数组如下,请帮助

array(
(int) 0 => array(
    'ProgrammeRequirementsSubject' => array(
        'programme_code' => 'HEN',
        'programme_name' => 'Electrical Engineering'
    )
)

1 个答案:

答案 0 :(得分:1)

echo $array[0]['ProgrammeRequirementsSubject']['programme_code'],
     '=>',
     $array[0]['ProgrammeRequirementsSubject']['programme_name'];