I want do add values to array in my function to show movies:
$movies = array();
function find_movie($tag) {
// SELECT MOVIE BY %TAG%
$movies[] = $MOVIE;
return '<a href="'.$MOVIE.'">WATCH MOVIE</a>';
}
Induction:
echo find_movie('cars'); // <a href="cars-movie.html">WATCH MOVIE</a>
My problem is here -> $movies
array is empty...
I want to have array with all movies what is showed.
How can I do that ?