Ayuda con PHP y Arrays
Soy nuevo en PHP y ya anduve buscando por todo el internet pero no encuentro nada!
Ya me canse y he venido con ustedes por una solución...
Tengo este PHP:
class Imdb
{
function getMovieInfoById($imdbId)
{
$arr = array();
$imdbUrl = http://www.imdb.com/title/ . Trim($imdbId) . / ;
$html = $this->geturl($imdbUrl);
if(stripos($html, <meta name=\ application-name\ content=\ IMDb\ /> ) !== false){
// $arr = $this->scrapMovieInfo($html);
$arr = $imdbUrl;
} else {
$arr = ¡No se econtro en IMDb! ;
}
return $arr;
}
function scrapMovieInfo($html)
{
$arr = array();
$arr['titulo'] = trim($this->match('/<title>(IMDb \- )*(.*?) \(.*?<\/title>/ms', $html, 2));
$arr['year'] = trim($this->match('/<title>.*?\(.*?(\d{4}).*?\).*?<\/title>/ms', $html, 1));
$arr['rating'] = $this->match('/ratingValue >(\d.\d)</ms', $html, 1);
}Quiero que en otro php... O fuera de la clase me imprima el array de titulo
Y eso es lo que no entiendo.
Como imprimir un array que esta dentro de una función?