Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$val私はこの値を取得していますSimpleXMLElement Object ( [0] => 464)。[0]ie464に値を$aに入れるにはどうすればよいですか。foreachを使用してみましたが、機能しません。どんな助けでも大歓迎です。
$val
SimpleXMLElement Object ( [0] => 464)
[0]
464
<?php $doc = new SimpleXMLElement('<foo>464</foo>'); $a = (int)$doc; // or (string) print_r($doc); print_r($a);
プリント
SimpleXMLElement Object ( [0] => 464 ) 464