Como mostrar contenido al Azar en PHP
<?php
$content = array(
'http://www.address1.com|image1|Caption 1',
'http://www.address2.com|image2|Caption 2',
'http://www.address3.com|image3|Caption 3',
'http://www.address4.com|image4|Caption 4'
);
shuffle($content);
foreach ($content as $value)
{
$explode = explode('|', $value);
echo '<p><a href="' . $explode[0] . '"><img src="/misc/php/shuffle/' . $explode[1] . '.gif" border="0" width="100" height="25" align="absmiddle"></a> <a href="' . $explode[0] . '">' . $explode[2] . '</a></p>';
}
?>
No hay comentarios.:
Publicar un comentario