Alex_DTP 0 Denunciar post Postado Setembro 28, 2008 Pessoal Como fazer com que 3 includes apareçam ao mesmo tempo mas em ordem randomica: Ex.: include ("pg1.php"); include ("pg2.php"); include ("pg3.php"); Usei este código que peguei aqui no forum mas ele randomiza as 3 pgs no mesmo include. <?php $pages = array('pg1.php', 'pg2.php', 'pg3.php'); include_once $pages[array_rand($pages, 1)]; ?>O que quero é as 3 includes sendo exibidas ao mesmo tempo mas a cada refresh em ordens diferentes. Uma luz por favor. Alex Compartilhar este post Link para o post Compartilhar em outros sites
{TeRmInAtOr} 1 Denunciar post Postado Setembro 28, 2008 <?php $pages = array('pg1.php', 'pg2.php', 'pg3.php'); shuffle($pages); foreach ($pages as $include) { include($include); } ?> Compartilhar este post Link para o post Compartilhar em outros sites
Alex_DTP 0 Denunciar post Postado Setembro 28, 2008 <?php $pages = array('pg1.php', 'pg2.php', 'pg3.php'); shuffle($pages); foreach ($pages as $include) { include($include); } ?> B e l e z a ! ! ! Valeu {TeRmInAtOr}, Alex Compartilhar este post Link para o post Compartilhar em outros sites