Código PHP:
include("conexion.php");
$consulta= mysql_query("SELECT * FROM `peliculas` ORDER BY `p_id` DESC",$con);
$query= mysql_fetch_array($consulta);
echo "<br><br><br>";
foreach($query as $row ){
foreach($query as $row ){
foreach($row as $key => $value){
$rows->$key
echo $key." <br>";
}
}
una ves que funcione ese quiero implementarlo en el MVC broculos que es algo asi
Código PHP:
<?php
$mvcPage = "home.tpl";
include("head.php");
$users = mysql_query("SELECT * FROM `peliculas` ORDER BY `p_id` DESC",$con);
foreach ($users as $user) {
$row = new Template("plantillas/borocli/html/ver.tpl");
foreach ($user as $key => $value) {
$row->set($key, $value);
}
$usersTemplates[] = $row;
}
$usersContents = Template::merge($usersTemplates);
$usersList->set("users", $usersContents);
$layout->set("content", $usersList->output());
/**
* Defines the main template and sets the users' content.
*/
/**
* Loads our layout template, settings its title and content.
*/
include("footer.php");
?>