Код: Выделить всё
array(
'messages' => array(
0 => array(
'id' => '3',
'subject' => 'what did you say last night?',
'message' => 'your mother wai',
'from' => '13',
'to' => '1',
'from_viewed' => '0',
'to_viewed' => '0',
'from_deleted' => '0',
'to_deleted' => '0',
'from_vdate' => NULL,
'to_vdate' => NULL,
'from_ddate' => NULL,
'to_ddate' => NULL,
'created' => '2016-05-14 14:02:12',
) ,
1 => array(
'id' => '2',
'subject' => 'this is new',
'message' => 'hello guy',
'from' => '11',
'to' => '1',
'from_viewed' => '0',
'to_viewed' => '0',
'from_deleted' => '0',
'to_deleted' => '0',
'from_vdate' => NULL,
'to_vdate' => NULL,
'from_ddate' => NULL,
'to_ddate' => NULL,
'created' => '2016-05-14 13:59:56',
) ,
2 => array(
'id' => '1',
'subject' => 'hello boy.',
'message' => 'i love this too much . what do you think about making this happen for tomorrow? already then . good bye',
'from' => '11',
'to' => '1',
'from_viewed' => '0',
'to_viewed' => '0',
'from_deleted' => '0',
'to_deleted' => '0',
'from_vdate' => NULL,
'to_vdate' => NULL,
'from_ddate' => NULL,
'to_ddate' => NULL,
'created' => '2016-05-14 13:54:02',
) ,
) ,
)
ОБНОВЛЕНИЕ
Я ПОПРОБУЮ СЛЕДУЮЩЕЕ, И ЭТО ДАЛ МНЕ 11,11,13 (с запятой сзади).
Код: Выделить всё
$from = $messages['messages'];
for ($col = 0; $col < 3; $col++) {
echo $messages['messages'][$col]['from'].",";
}