SimpleXMLElementで public 0(ゼロ)の参照方法
Feb 4, 2015AD:
		
		
	
	Pyament Getwayのreturnに下記の内容が返ってきたのですが、参照方法に地味に悩みました。
| 1 2 3 | var_dump($results); object(SimpleXMLElement)[255]   public 0 => string '1234' | 
やったこと
| 1 2 3 4 5 | echo $results->0; //error $zero = 0; echo $results->$zero //noithing echo $results->{0} //noithing echo $results //noithing | 
解決方法
型の指定だけで、参照できるようになっているですね。。。。ははは
| 1 | echo (string)$results // 1234 | 
		AD:
			
			
		
		
	

 Ayumi Mizoshiri
Ayumi Mizoshiri







No Comments, Comment or Ping
Reply to “SimpleXMLElementで public 0(ゼロ)の参照方法”
Warning: Undefined variable $user_ID in /home/sazaeau/mizoshiri.com/public_html/blog.mizoshiri.com/wp-content/themes/grid_focus_public_mizo/comments.php on line 66
You must be logged in to post a comment.