Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/07/2006, 12:25
Avatar de 8461277
8461277
 
Fecha de Ingreso: diciembre-2002
Ubicación: san juan de los morros
Mensajes: 887
Antigüedad: 21 años, 4 meses
Puntos: 1
Arreglo dinamico,,,,urgente???

Amigos tengo una parte de un codigo que tiene un arreglo el cual se le coloca los datos para que aparesca en un calendario, el pedazo de codigo que hace eso es:


Código PHP:
  /*Aqui se colocas los eventos por cada dias y con enlace si quieres*/
 
$remind=array(
  
'1-7-2006'=>array('blog.php?id=01072006','A day to remember'),
  
'12-7-2006'=>array('#','Don\'t need any link'),
  
'26-7-2006'=>array('http://www.google.com','Debo revisar google'),  
  
'30-7-2006'=>array('#','Debo ir a Clasesfgfdgfxgdfxgxcfgxcfbxcfghxdfghfggh dfghxdfgxdfgdfx !!'),
  
'31-7-2006'=>array('#','Debo ir a Clasesfgfdgfxgdfxgxcfgxcfbxcfghxdfghfggh dfghxdfgxdfgdfx !!'),
  
'11-6-2006'=>array('#','Also for previous Month !!')
  );
   
   
  
$calendar = new NiceCalendar($remind,1,$_GET['month'],$_GET['year']); 
  
$calendar->draw(); 
YO LO ESTOY TRATANDO DE MODIFICAR PARA QUE LO LEA DESDE UNA BASE DE DATOS, Y EL CODIGO QUE ESTOY TRATANDO DE ARMAR ES ESTE:

Código PHP:
$conectar=mysql_connect('localhost','root','') or die("No se puede establecer conexión con el servidor");
mysql_select_db('eventosCalen',$conectar);

$result=mysql_query("select * from eventos ",$conectar);

while(
$remind=mysql_fetch_assoc($result))  
 {  
 foreach(
$remind as $link => $cita) { 
     
"$remind['fecha']"=>array('$link: $cita');
     } 

ME DE EL SIGUIENTE ERROR:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in c:\wamp\www\calendari nuevo\calen.php on line 108


ESE NUEMRO DE LINEA QUE DA ERROR ES:
Código PHP:
 "$remind['fecha']"=>array('$link: $cita'); 
ALGUIEN ME ORIENTA PR FAVOR, ESTOY DESESPERADO
__________________
Miguel Padrón :cool: