Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $array = array(
- 'test' => 'lol',
- 'removed' => 'this one will be gone'
- );
- // Casting the array to a object
- $object = (object)$array;
- // Prints the object without the removed content
- print_r($object);
- function remove($object) {
- unset($object->removed);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement