I get a & lt; I am tring to put a picture, title and rating of each film within the array in ul & gt; & Lt; Li & gt;
But I can only put it in the first film, title and rating.
& lt ;! DOCTYPE html public "- // W3C // DTD XHTML 1.0 strict // n" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> & Lt ;? Php require_once 'init.php'; Need_once 'sessionCheck2.php'; $ Query = $ con - & gt; Leave Query ("SELECT movies.id, movies.image, movies.movie_name, AVG (user_movie_ratings.rating) as ratings from movies, User_movie_artings movies in doubles. User_movie_writing.movi_id group.im movies"); $ MovieTitle = Array (); While ($ line = $ query-> fetch_object ()) {$ movieTitle [] = $ line; }? & Gt; & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Top & gt; & Lt; Title & gt; Home and lt; / Title & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = ISO-8859-1" /> & Lt; Link rel = "stylesheet" type = "text / css" href = "styles.css" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "wrapper" & gt; & Lt; Div id = "header" & gt; & Lt; Div id = "h1" & gt; & Lt; / Div & gt; & Lt; Div id = "login" & gt; & Lt ;? Include Php // 'loginCheck.php' ;? & Gt; & Lt ;? Php included 'login.php' ;? & Gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "movies" & gt; & Lt ;? Php foreach ($ movieTitle $ as Movie):? & Gt; & Lt ;? Php echo " - . '& Lt; Img src = "'. $ Movie-> Image." "/ & Gt; ';? & Gt; & lt; div class =" CFF "& gt; & gt; Php echo $ movie- & gt; movie_name;? & Gt; & lt; / div & gt; Lt; div class = "s11 c999" & gt; Rating: & lt ;? php echo round ($ movie- & gt; rating);? & Gt; & lt; / div> & lt ;? php echo & Lt; / Li & gt; & Lt; / Ul & gt; "?; & Gt; & lt; / div & gt; & lt ;? php endforeach;? & Gt; div id =" footer "& gt; This footer is & lt; / Div & gt; & gt; / div> & lt; / body & gt; & lt; / html & gt;
No comments:
Post a Comment