
Untitled
By: a guest on
Jun 2nd, 2012 | syntax:
None | size: 0.55 KB | hits: 14 | expires: Never
What does (array) do in php?
stdClass Object (
[ExampleCentre] => Array (
[0] => stdClass Object (
[ID] => 14
[Name] => mycity
[Code] => exm
[Email] => example.web@example.com
[FB] =>
[Address1] => Exm, example
[City] => Hakuna Matata
[PostCode] => 000000
[County] =>
[Fax] => Fax
[Telephone] => 000222888
[Location] => 01.000000,-0.00004
[URL] => /holla/hakuna/example
)
$obj = new stdClass;
$obj->foo = 'value1';
$obj->bar = 'value2';
var_dump((array) $obj);
array(2) {
["foo"]=>
string(6) "value1"
["bar"]=>
string(6) "value2"
}