Guest User

Untitled

a guest
Jun 2nd, 2012
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. What does (array) do in php?
  2. stdClass Object (
  3.  
  4. [ExampleCentre] => Array (
  5.  
  6. [0] => stdClass Object (
  7. [ID] => 14
  8. [Name] => mycity
  9. [Code] => exm
  10. [Email] => [email protected]
  11. [FB] =>
  12. [Address1] => Exm, example
  13. [City] => Hakuna Matata
  14. [PostCode] => 000000
  15. [County] =>
  16. [Fax] => Fax
  17. [Telephone] => 000222888
  18. [Location] => 01.000000,-0.00004
  19. [URL] => /holla/hakuna/example
  20. )
  21.  
  22. $obj = new stdClass;
  23. $obj->foo = 'value1';
  24. $obj->bar = 'value2';
  25. var_dump((array) $obj);
  26.  
  27. array(2) {
  28. ["foo"]=>
  29. string(6) "value1"
  30. ["bar"]=>
  31. string(6) "value2"
  32. }
Advertisement
Add Comment
Please, Sign In to add comment