Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Post extends AppModel {
- public $actsAs = array('Containable');
- array(
- (int) 0 => array(
- 'Post' => array(
- 'id' => '1',
- 'title' => 'This is the first post',
- 'slug' => 'this-is-the-first-post',
- 'body' => 'body body 111body body 111body body 111body body 111body body 111body body 111body body 111',
- 'image_id' => '0',
- 'language' => 'sv',
- 'translation_id' => '0',
- 'created' => '2012-09-03 17:45:57',
- 'modified' => '2012-09-03 19:12:21'
- ),
- 'Image' => array(
- 'id' => null,
- 'name' => null,
- 'url' => null,
- 'alt' => null,
- 'description' => null
- ),
- 'Asset' => array(),
- 'Readmore' => array(),
- 'Reference' => array(),
- 'Category' => array(),
- 'Course' => array(),
- 'Tag' => array(),
- 'User' => array(
- (int) 0 => array(
- 'password' => '*****',
- 'id' => '2',
- 'username' => 'test0',
- 'fullname' => 'Test Test',
- 'url' => '',
- 'email' => '',
- 'role' => 'admin',
- 'phone' => '+',
- 'created' => '2012-09-03 17:44:22',
- 'PostsUser' => array(
- 'id' => '1',
- 'post_id' => '1',
- 'user_id' => '2'
- )
- ),
- (int) 1 => array(
- 'password' => '*****',
- 'id' => '1',
- 'username' => 'test1',
- 'fullname' => 'Frank',
- 'url' => '',
- 'email' => '',
- 'role' => 'admin',
- 'phone' => '',
- 'created' => '2012-09-03 17:41:25',
- 'PostsUser' => array(
- 'id' => '3',
- 'post_id' => '1',
- 'user_id' => '1'
- )
- )
- )
- ),
- echo h($post['Post']['title']);
- echo h($post['User']['fullname']);
- echo h($post['User'][0]['fullname']);
- <?php
- foreach($post['User'] as $user) {
- echo h($user['fullname']);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement