Ver Mensaje Individual
  #2 (permalink)  
Antiguo 20/04/2009, 16:28
Avatar de pateketrueke
pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años, 1 mes
Puntos: 2534
Respuesta: PHP ES MVC sin utilizar un framework

MVC sin framework:

index.php
Código PHP:
<?php

include 'datos.php';
include 
'tabla.php';
datos.php
Código PHP:
<?php
$sql 
'SELECT * FROM tabla';
$res mysql_query($sql) or die(mysql_error());

$datos = array();

while (
false !== ($row mysql_fetch_object($res)))
{
  
$datos []= $row;
}
tabla.php
Código PHP:
<table>
<?php
foreach ($datos as $item)
{
?>
<tr><td><?php echo $item->nombre?></td>
<td><?php echo $item->valor?></td></tr>
<?php
}
?>
</table>
supongo que a esto te refieres...


suerte!
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.