1
Cakephp의 배열에서 표시 할 데이터를 얻으려고하는데 Array에는 find() 출력의 모든 데이터와 데이터 출력의 다른 부분이 있습니다.Cakephp의 배열에서 값 가져 오기
내가 액세스하려고하는 데이터는 회사 내부의 이름 필드이며, 사용하는 코드는 echo $quote['Company']['name']
이지만 인덱스가 정의되지 않았다는 오류가 반환됩니다. 배열의 미세
내용을 작동 echo $quote['Status']['name']
코드는 배열에서이
Array (
[Quote] => Array ([id] => 3 [name] => Eighties Yeh that aint right [revision] => 1 [status_id] => 1 [contact_id] => 1 [totalcost] => 500 [created] => 2010-01-20 13:26:36) [Status] => Array ([id] => 1 [name] => Open
[Quote] => Array ([id] => 3 [name] => Eighties Yeh that aint right [revision] => 1 [status_id] => 1 [contact_id] => 1 [totalcost] => 500 [created] => 2010-01-20 13:26:36
[0] => Array ([id] => 3 [name] => Eighties Yeh that aint right [revision] => 1 [status_id] => 1 [contact_id] => 1 [totalcost] => 500 [created] => 2010-01-20 13:26:36)
[1] => Array ([id] => 4 [name] => Test [revision] => 12 [status_id] => 1 [contact_id] => 1 [totalcost] => 23 [created] => 2010-01-20 19:05:36)))
[Contact] => Array ([id] => 1 [company_id] => 1 [name] => Kieran Hutchinson [email] => [email protected]
[Company] => Array ([id] => 1 [name] => Red Meets Blue)
[Quote] => Array ([id] => 2 [name] => Test Quote 2 [revision] => 1 [status_id] => 0 [contact_id] => 1 [totalcost] => 300 [created] => 2010-01-17 10:30:31
[0] => Array ([id] => 2 [name] => Test Quote 2 [revision] => 1 [status_id] => 0 [contact_id] => 1 [totalcost] => 300 [created] => 2010-01-17 10:30:31)
[1] => Array ([id] => 5 [name] => test 4 [revision] => 1 [status_id] => 3 [contact_id] => 1 [totalcost] => 233 [created] => 2010-01-20 19:05:55)
[2] => Array ([id] => 3 [name] => Eighties Yeh that aint right [revision] => 1 [status_id] => 1 [contact_id] => 1 [totalcost] => 500 [created] => 2010-01-20 13:26:36) [3] => Array ([id] => 4 [name] => Test [revision] => 12 [status_id] => 1 [contact_id] => 1 [totalcost] => 23 [created] => 2010-01-20 19:05:36)
[4] => Array ([id] => 6 [name] => Test Lost Quote [revision] => 1 [status_id] => 4 [contact_id] => 1 [totalcost] => 123 [created] => 2010-01-21 16:00:43)
[5] => Array ([id] => 7 [name] => Test Pending QUote [revision] => 1 [status_id] => 2 [contact_id] => 1 [totalcost] => 321 [created] => 2010-01-21 16:00:57))) [QuoteItem] => Array ())
완벽하게 올바른 .... 질수 믿습니다 내가 통해 액세스 할 필요가 보인다 그것을 놓 쳤어 - 고마워. – kwhohasamullet