I have a data that looks like this:
array(
'Post'=>array(
'title'=>'Hello world',
'content'=>'Test',
),
'Comment'=>array(
'content'=>'Testing',
'User'=>array(
'id'=>'1',
'username'=>'user1'
)
)
)
I want to flatten the array including the keys so it looks like this:
array(
array(
'Post.title'=>'Hello world',
'Post.content'=>'Test',
'Comment.content'=>'Testing',
'Comment.User'=>array(
'Comment.User.id'=>1,
'Comment.User.username'=>'user1'
)
),
array(
'Post.title'=>'Hello world',
'Post.content'=>'Test',
'Comment.content'=>'Testing',
'Comment.User'=>array(
'Comment.User.id'=>1,
'Comment.User.username'=>'user1'
)
)
);
Any ideas?
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
To unsubscribe from this group, send email to
cake-php+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.