|    
			
				10/06/2010, 16:51
			
			
			  | 
  |   |  |  |  Fecha de Ingreso: abril-2010 Ubicación: Extremadura 
						Mensajes: 128
					 Antigüedad: 15 años, 6 meses Puntos: 2 |  | 
  |  pasar arrays a javascript  
  hola amigos, tengo un pekeño problema al conbertir el array k tengo en php a un arrays en javascript para pasarselo a una funcion javascript, no se mu bine donde ta el problema....
 <head>
 
 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <meta http-equiv="content-language" content="en" />
 
 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
 <script src="http://maps.google.com/maps/api/js?sensor=false®ion=ES" type="text/javascript"></script>
 <script src="jquery.zgooglemap.js" type="text/javascript"></script>
 
 </head>
 <body>
 
 <?php
 
 $dir = array('calle sevilla, zafra, españa', 'calle garrotera, zafra, españa');
 $nombre = array('CALLE SEVILLA', 'GARROTERA');
 $vinculo = array('sssssssssssssssss', 'dddddddddddddddddd');
 echo $numero = count($dir);
 ?>
 
 
 <script type="text/javascript">
 var aLocations = new Array();
 var aTitles = new Array();
 var aSummary = new Array();
 <?php for($i==0;$i <$numero ;$i++){ ?>
 aLocations["<?php echo $i; ?>"] = "<?php echo $dir[$i]; ?>";
 aTitles["<?php echo $i; ?>"] = "<?php echo $nombre[$i]; ?>";
 aSummary["<?php echo $i; ?>"] = "<?php echo $vinculo[$i]; echo "dwddsdf";}?>";
 
 
 alert("sssssss");
 $(document).ready(function() {
 $('#test').GoogleMap(aLocations, aTitles, aSummary, {
 type: 3,
 zoom: 20,
 tipsuffix: 'enabled'
 });
 });
 
 </script>
 
 <div id="test"></div>
 
 </body>
 </html>
     |