자스에서 php 변수 출력 토할것 같습니다..-_-;; 왜 이런지.. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

자스에서 php 변수 출력 토할것 같습니다..-_-;; 왜 이런지.. 정보

자스에서 php 변수 출력 토할것 같습니다..-_-;; 왜 이런지..

본문

<? for($i=0; $i<=count($list_view); $i++) : ?>
  x_point[<?=$i?>] = "<?=$list_view[$i]['x_point']?>";
  y_point[<?=$i?>] = "<?=$list_view[$i]['y_point']?>";
  infobox[<?=$i?>] = "<?=$list_view[$i]['wr_subject']?>";
<? endfor; ?>

대략 코딩중에 있습니다만..ㅡㅠ

<?=$list_view[$i]['wr_subject']?> 요녀석만 출력이 안되네요..왜 그럴까요..
<?=$list_view[1]['wr_subject']?> 이런식으로 하면 출력이 된답니다..으흠.

for문 돌리기 전에 변수 확인을 해봤는데 잘 나옵니다.
단지 스크립트 안에서 $i와 함께 하니 안되네요..

끄억...도무지 문제점을 못 찾겠습니다..

댓글 전체

<SCRIPT LANGUAGE="JavaScript">
<!--
//기본설정
var mapObj = new NMap(document.getElementById('map_map')); // 지도창
var infowin = new NInfoWindow();
var icon = new NIcon("<?=$g4['path']?>/img/map_icon.gif", new NSize(15,15)); // 아이콘파일
var loc_center = new NPoint(<?=$center_x_point?>,<?=$center_y_point?>);  // 지도 중앙 좌표
var zoomlevel = <? echo $map_zoom; ?>
//기본설정 끝
var x_point = new Array();
var y_point = new Array();
var infobox = new Array();
<? for($i=0; $i<=count($list_view); $i++) : ?>
x_point[<?=$i?>] = "<?=$list_view[$i]['x_point']?>";
y_point[<?=$i?>] = "<?=$list_view[$i]['y_point']?>";
infobox[<?=$i?>] = "<?=$list_view[$i]['wr_subject']?>";
<? endfor; ?>
    for (i=0; i< x_point.length; i++)
    {
//좌표 설정 및 이름 출력
var loc_point = new NPoint(x_point[i],y_point[i]);
var map_mark = new NMark(loc_point, icon );
var info_box = "<div style='padding:2px; background-color: #ffffff; border: 2px solid #ffcc44;'>"+infobox[i]+"</div>";
NEvent.addListener(map_mark,"mouseover",function(loc_point){infowin.set(loc_point,info_box);infowin.showWindow()});
NEvent.addListener(map_mark,"mouseout",function(){infowin.hideWindow();});
mapObj.addOverlay(map_mark); // 지도에 마크표시
//좌표 설정 및 이름 출력 끝
    }
mapObj.setCenterAndZoom(loc_center,zoomlevel); // 지도 중앙과 줌레벨 결정해서 보여준다!
mapObj.addOverlay(infowin);

//-->
</SCRIPT>
스크립트 소스입니다.=ㅁ=
끄응....정답이 여기 있었네요..바보 같이 그걸 왜 깜빡했는지.
하아.
다른 곳에서 문제가 있었습니다.;; 문제는 해결중에 있습니다만,
여튼 한마디 감사합니다.
전체 2 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT