Rotador de banners - SOY NUEVO TENGA CALMA!!

From: Date: Sat, 22 Jun 2002 17:05:54 +0000
Subject: Rotador de banners - SOY NUEVO TENGA CALMA!!
Groups: php.general.es 
Request: Send a blank email to general-es+get-24139@lists.php.net to get a copy of this message
Hola, cómo estan? alguien me podria decir como rotar banners con PHP tengo un código pero pero no me funciona bien: <? $numbanners = 3 //numero de banners que se rotarán $random = rand(1,$numbanners); $img = array(); $url = array(); $txt = array(); $img[1] = "archivos/banner1.gif"; $url[1] = "http://www.enlace1.com"; $txt[1] = "Visita el enlace del banner 1"; $img[2] = "archivos/banner2.gif"; $url[2] = "http://www.enlace2.com"; $txt[2] = "Visita el enlace del banner 2"; $img[3] = "archivos/banner3.gif"; $url[3] = "http://www.enlace3.com"; $txt[3] = "Visita el enlace del banner 3"; echo "<a href='$url[$random]' target='_blank'><img src='$img[random]' alt='$txt[random]' border='0'></a>"; ?> este código lo grabo como banner.php y desde cualquier página lo llamo <? include("banner.php") ?> pero no funciona sale este error: Parse error: parse error in /www/docs/diosatotal.com/public_html/ads.php on line 3 Muchas Gracias a todos por estar.

« previous php.general.es (#24139) next »