I'm using
I'm using
To get to print , just movie needs to navigate to the correct point :
$xml->CINEMAS->CINEMA->FILMES->FILME
For example:
<?php
$url = 'http://www.multicinecinemas.com.br/webservice/'
$url .= '?chave=c99e34ed77750774417e5a9d2a2f5135&tipo=cinema';
$xml = simplexml_load_file($url);
foreach($xml->CINEMAS->CINEMA->FILMES->FILME as $filme)
{
echo $filme->CODIGO;
echo ' ';
echo $filme->NOME;
echo ' ';
echo $filme->HORARIO;
echo ' ';
echo "<br>";
}
To repeat the same process for several files use a function like this:
function toPrint(array $array = array())
{
foreach($array as $items)
{
foreach($items->CINEMAS->CINEMA->FILMES->FILME as $filme)
{
echo $filme->CODIGO;
echo ' ';
echo $filme->NOME;
echo ' ';
echo $filme->HORARIO;
echo ' ';
echo "<br>";
}
}
}
$url = 'http://www.multicinecinemas.com.br/webservice/'
$url .= '?chave=c99e34ed77750774417e5a9d2a2f5135&tipo=cinema';
$xml = simplexml_load_file($url);
toPrint(array($xml1, $xml2));