Can anyone tell me how I can get just the name value in the code below.
index page.
<?php
$curl = curl_init('http://localhost/server.php');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$resultado = curl_exec($curl);
curl_close($curl);
$xml = simplexml_load_string ($resultado);
echo $resultado;
echo $xml->nome;
?>
Server page:
$note=<<<xml
<note>
<nome>xiro</nome>
</note>
xml;
$xml = simplexml_load_string ($note);
var_dump($xml);