Mam coś takiego:
$xml = simplexml_load_file($working_file); foreach ($xml->Project as $projekt) { ....
i pomimo, iż w xmlu mam np. 200 to wywala mi flagę, że nie jest liczbą.
$xml = simplexml_load_file($working_file); foreach ($xml->Project as $projekt) { ....
$string = '333'; $int = (int) $string; // ale z tym ostrożnie, bo: $string = 'bbb'; $int = (int) $string; no i: $string = '333xxx'; $int = (int) $string;
object(SimpleXMLElement)#5 (1) { [0]=> string(3) "200" }
$string = (string) $tenobiekt;