테스트 사이트 - 개발 중인 베타 버전입니다

엑셀 저장시 값 출력 좀 도와 주세요...ㅜㅜ 채택완료

럭스타 1년 전 조회 1,075

게시판에서 데이터를 입력 할때 값을 input1 에다가 input1[0], input1[1], input1[2].. 이렇게 받는데요. 

엑셀에 다운로드 할려고 하니 값을 input1로만 불러오니  input1[0], input1[1], input1[2].. 이 값들이 다 불러와 지는데 input1[0] 이 값만 따로 불러 오려면 어떻게 해야 할까요? ?

입력창

</strong></p>

<p><?php $input1 = explode('|', $write['input1']);?>

                <tr>

                    <th rowspan="2" >업체명 <i class="point">1)</i></th>

                    <th style="width : 10%;">한글</th>

                    <td><input type="text" value="<?php echo $input1[0]?>" name="input1[]" ></td>

                    <th style="width : 10%;">대표전화</th>

                    <td><input type="text" value="<?php echo $input1[1]?>" name="input1[]" ></td>

                </tr>

                <tr>

                    <th>영문<i class="point">2)</i></th>

                    <td><input type="text" value="<?php echo $input1[2]?>" name="input1[]" ></td>

                    <th>FAX번호</th>

                    <td><input type="text" value="<?php echo $input1[3]?>" name="input1[]" ></td>

                </tr></p>

<p><strong>

 

엑셀 다운로드 출력 창

</p>

<p><?php

while($row=sql_fetch_array($qry)) {

    echo "

    <tr>

        <td class='txt'>{$row['input1']}</td>

    </tr></p>

<p>  ";

    $number--;

}

?></p>

<p>

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트
1년 전

</p>

<p><?php

while($row=sql_fetch_array($qry)) {</p>

<p>    $input1 = explode('|', $row['input1']);

    echo "

    <tr>

        <td class='txt'>{$input1[0]}</td>

    </tr>

  ";

    $number--;

}

?></p>

<p>

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

럭스타
1년 전
감사합니다~~~~~!!!

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인