- print_r: documentation ( source)
<?php
function pr($s) {
return '<xmp>'.print_r($s,true).'</xmp>' ;
}
global $pippo;
$file = 'http://www.dominioinventatoacaso.com/somefile.jpg';
$doc = '<root><element att="uno"><sotto>Ciao</sotto><sotto>Mamma</sotto></element></root>' ;
$s = new SimpleXMLElement($doc) ;
$x = $s->children()[0] ;
echo "prima\n" ;
echo pr($x->children()) ;
echo "dopo\n" ;