Jump to content

return array


alejandro52

Recommended Posts

I want to return an array using ajax to javascript.

 

 if(xmlhttpmail.status ==200){	  myarray = xmlhttpmail.responseText;	   for(i=0;i<10;i++){		  document.getElementById("mylabel").innerHTML += myarray[1];; 	   }  }else{	   document.getElementById("mylabel").innerHTML=xmlhttpmail.status;  }

 

 

 

if(isset($_GET["id"])){$id=$_GET["id"];$sql="SELECT * FROM keimena WHERE keim_id = '".$id."'";$result = mysql_query($sql);$num = mysql_num_rows($result);$row = mysql_fetch_array($result);if($num == 1){	echo $row;}else{	echo false;}}

 

As you can see i awant to return an array but it doesn't return anything.

Link to comment
https://forums.phpfreaks.com/topic/214520-return-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.