Return to Snippet

Revision: 42205
at March 1, 2011 07:58 by nosmk


Initial Code
<?
$r=query("select * from museo where prov_id like 1 order by nombre ");
$n=count($r)-1;
$class="";

for($i=0; $i<$n; $i++)
{
if($class=='class="odd"') $class=''; else $class='class="odd"';
?>

<tr <? echo $class ?> ><td><? echo ver($r, $i, "nombre"); ?></td>
	        <td class="action">
			<a id="ver2<? echo $i ?>" href="museo-coleccion.php?id=<? echo(ver($r, $i, "museo_id")); ?>"class="view">Coleccion</a>
			<a id="ver<? echo $i ?>" href="museo-fotos.php?id=<? echo(ver($r, $i, "museo_id")); ?>"class="view">Fotos</a>
			<a id="editar<? echo $i ?>" href="museo-e.php?id=<? echo(ver($r, $i, "museo_id")); ?>" class="edit">Editar</a>
			<a href="museo-b.php?id=<? echo(ver($r, $i, "museo_id")); ?>&cat=<? echo rget("cat"); ?>&zona=<? echo rget("zona"); ?>" id="borrar<? echo $i ?>" class="delete">Borrar</a><div class="<? if(ver($r, $i, "estado") == 1){?>visible<?} else { ?> invisible <?}; ?>"></div></td>
	    </tr>
<?}
};
}?>

Initial URL


Initial Description


Initial Title
PHP Bucle Table

Initial Tags
php, textmate

Initial Language
PHP