Ver Mensaje Individual
  #3 (permalink)  
Antiguo 27/05/2011, 07:03
cabritillo77
 
Fecha de Ingreso: mayo-2011
Mensajes: 33
Antigüedad: 13 años
Puntos: 4
Respuesta: cargar array de php

Hola pithon. Me imagino que lo que estas tratando de hacer es trabajar con esas imagenes y publicarlas posteriormente.
Te dejo un script por si te pudiera servir:

Código PHP:
// armamos la consulta
$sqlQueryNot mysql_query("SELECT not_ID, notTitulo, notTexto, foto, link FROM sn_noticias where notCategoriaID='1' ORDER BY not_ID DESC LIMIT 4"$db_link) or die(mysql_error);
//Declarar el array 

$Arrayfoto = array(foto); 
 
  while(
$rowNot mysql_fetch_array($sqlQueryNot)){ 

$Arrayfoto[]= $rowNot[foto];


Aqui lo que haces es obtener todas las iagenes en un array. Luego para publicarlas:

Código PHP:
<a href="nombre_carpeta/<? echo $Arrayfoto[1]; ?>"><img src="nombre_carpeta/<? echo $Arrayfoto[1]; ?>" width="85" height="85"></a><br><br>

<a href="nombre_carpeta/<? echo $Arrayfoto[2]; ?>"><img src="nombre_carpeta/<? echo $Arrayfoto[2]; ?>" width="85" height="85"></a><br><br>

<a href="nombre_carpeta/<? echo $Arrayfoto[3]; ?>" id="1"><img src="nombre_carpeta/<? echo $Arrayfoto[3]; ?>" width="85" height="85"></a><br><br>

<a href="nombre_carpeta/<? echo $Arrayfoto[4]; ?>"><img src="nombre_carpeta/<? echo $Arrayfoto[4]; ?>" width="85" height="85"></a><br><br>
Espero te sirva