Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $var=array(
- 'users' => array()
- );
- $b = array(
- new StdClass,
- new StdClass,
- new StdClass,
- new StdClass
- );
- foreach ( $b as $a )
- {
- $var['users'][] = $a;
- }
- echo json_encode($var);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement