如何使用foreach從該數組中獲取std對象的值?從數組中獲得foreach值
Array (
[0] => stdClass Object (
[SubmissionValueId] => 28
[FormId] => 3
[SubmissionId] => 4
[FieldName] => Typ
[FieldValue] => Panoramiczny
)
[1] => stdClass Object (
[SubmissionValueId] => 29
[FormId] => 3
[SubmissionId] => 4
[FieldName] => Producent
[FieldValue] => sony
)
[2] => stdClass Object (
[SubmissionValueId] => 30
[FormId] => 3
[SubmissionId] => 4
[FieldName] => Model
[FieldValue] => sony
)
[3] => stdClass Object (
[SubmissionValueId] => 31
[FormId] => 3
[SubmissionId] => 4
[FieldName] => Rok produkcji
[FieldValue] => 1993
)
[4] => stdClass Object (
[SubmissionValueId] => 32
[FormId] => 3
[SubmissionId] => 4
[FieldName] => Nr seryjny
[FieldValue] => sdadas
)
[5] => stdClass Object (
[SubmissionValueId] => 33
[FormId] => 3
[SubmissionId] => 4
[FieldName] => Nr seryjny lampy
[FieldValue] => sdadsd
)
[6] => stdClass Object (
[SubmissionValueId] => 34
[FormId] => 3
[SubmissionId] => 4
[FieldName] => data2
[FieldValue] => 05.08.2012
)
[7] => stdClass Object (
[SubmissionValueId] => 35
[FormId] => 3
[SubmissionId] => 4
[FieldName] => Wyslij
[FieldValue] => Wyślij
)
[8] => stdClass Object (
[SubmissionValueId] => 36
[FormId] => 3
[SubmissionId] => 4
[FieldName] => formId
[FieldValue] => 3
)
)
F.ex我需要[ '字段名']我tryed
foreach ($wartosci as $value)
{ echo $value['FieldName'];}
但它無法正常工作。
[你嘗試過什麼?](http://www.whathaveyoutried.com) – Kermit