2つの配列を比較して、正しい値をエコーする必要があるシステムで作業しています
[1] => Array
(
[Message] => Array
(
[id] => 4f8c74ce-8590-4e8b-a5ba-6f54b2158146
[user_id] => 1
[to_user_id] => 3
[created] => 2012-04-16 21:36:46
[last_message_id] => 8
[message_count] => 2
)
[MessageItem] => Array
(
[0] => Array
(
[id] => 7
[message_id] => 4f8c74ce-8590-4e8b-a5ba-6f54b2158146
[user_id] => 1
[message] => Whola amigo
[read] => 0
[created] => 2012-04-16 21:36:46
)
[1] => Array
(
[id] => 8
[message_id] => 4f8c74ce-8590-4e8b-a5ba-6f54b2158146
[user_id] => 1
[message] => sdfsdfdsfdsfsdfds
[read] => 0
[created] => 2012-04-16 21:37:54
)
)
)
だから..私はしたい
ECHO ['MessageItem]['message'] WHERE ['MessageItem]['id'] == ['Message]['last_message_id']
phpを使用してこれを達成する方法がわからない!?!
助けてくれてありがとう!
-トム