<div>$q = mysql_query("SELECT kind, COUNT(*) as votes FROM domitory GROUP BY kind");</div> <div>//$votes = array();</div> <div>$votes = array();</div> <div>while ($row = mysql_fetch_assoc($q)) {</div> <div> $votes[$row['kind']] = $row['votes'];</div> <div>}</div> <div><br></div> <div>array("kind"=>$kind, "count"=>$count);</div> <div><br></div> <div><br></div> <div><span class="Apple-tab-span" style="white-space:pre;"> </span>//echo json_encode($votes);</div> <div><br></div> <div> $json_result = json_encode(array("result"=>$votes));</div> <div> echo $json_result;</div> <div><br></div> <div><br></div> <div>이런식으로 돌아가면</div> <div><br></div> <div>이렇게 출력됩니다.</div> <div><span style="font-family:'Malgun Gothic';font-size:medium;">{"result":{"man":"5","roop":"1"}}</span></div> <div><span style="font-family:'Malgun Gothic';font-size:medium;"><br></span></div> <div><span style="font-family:'Malgun Gothic';font-size:medium;"><br></span></div> <div><font face="Malgun Gothic" size="3">근데 안드로이드에서 돌리면 어레이로 변환이 필요하다고 해서 봤더니</font></div> <div><span style="font-family:'Malgun Gothic';font-size:medium;">{"result":[{"man":"5","roop":"1"}]}</span></div> <div><span style="font-family:'Malgun Gothic';font-size:medium;"><br></span></div> <div><span style="font-family:'Malgun Gothic';font-size:medium;">이런식으로 나와야하는건데 뭘 조절해야할지 감이 안잡힙니다.. ㅠㅠ</span></div>
<div style="text-align:center;"><img src="http://eusave.dothome.co.kr/gif.php?id=0B4MpkGgWbWt6T2lObjI2d293VW8" alt="iu.jpg" style="font-size:9pt;line-height:1.5;border:none;"></div>
<div style="text-align:center;"><img_ src="http://eusave.dothome.co.kr/gif.php?id=0B1-Nk0QyKrjDeVlnM3hCYllaRkk" alt="iu.jpg" style="font-size:9pt;line-height:1.5;border:none;"></div>
<div style="text-align:center;">
<div style="text-align:center;"><img_ src="http://eusave.dothome.co.kr/gif.php?id=0B1-Nk0QyKrjDeVlnM3hCYllaRkk" alt="iu.jpg" style="font-size:9pt;line-height:1.5;border:none;"></div>
<div style="text-align:center;">
<div style="text-align:center;"><img_ src="http://eusave.dothome.co.kr/gif.php?id=0B1-Nk0QyKrjDRWlMa09ieDZsMlE" alt="iu.jpg" style="font-size:9pt;line-height:1.5;border:none;"></div>
<div style="text-align:center;">
<div style="text-align:center;"><img_ src="http://eusave.dothome.co.kr/gif.php?id=0B8fuRvQ1iHqPX0lRN2drTXU5OWc" alt="iu.jpg" style="font-size:9pt;line-height:1.5;border:none;"></div>
<div style="text-align:center;"></div></div></div></div>
댓글 분란 또는 분쟁 때문에 전체 댓글이 블라인드 처리되었습니다.