엑셀 저장시 값 출력 좀 도와 주세요...ㅜㅜ
본문
게시판에서 데이터를 입력 할때 값을 input1 에다가 input1[0], input1[1], input1[2].. 이렇게 받는데요.
엑셀에 다운로드 할려고 하니 값을 input1로만 불러오니 input1[0], input1[1], input1[2].. 이 값들이 다 불러와 지는데 input1[0] 이 값만 따로 불러 오려면 어떻게 해야 할까요? ?
입력창
<?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>
엑셀 다운로드 출력 창
<?php
while($row=sql_fetch_array($qry)) {
    echo "
    <tr>
        <td class='txt'>{$row['input1']}</td>
    </tr>
  ";
    $number--;
}
?>
답변 1
<?php
while($row=sql_fetch_array($qry)) {
    $input1 = explode('|', $row['input1']);
    echo "
    <tr>
        <td class='txt'>{$input1[0]}</td>
    </tr>
  ";
    $number--;
}
?>
                답변을 작성하시기 전에 로그인 해주세요.
            
    
