묻고답하기

<?php
 $info = array(
   "host"  => "db",
   "user"  => "db",
   "pass"  => "db",
   "db"  => "db",
   "table"  => "xe_member"
   );
 $xls_filename = "cell_number.xls";

 header("Content-type: application/vnd.ms-excel");
 header("Content-Disposition: attachment; filename=$xls_filename");

 $con = mysql_connect($info[host], $info[user], $info[pass]) || die(mysql_error());
 mysql_query("set names utf8");
 $con_db = mysql_select_db($info[db]) || die(mysql_error());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="EN" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv=Content-Type content=text/html; charset="utf-8" />
</head>
<body>
<table border=1>
<tr>
<?php
 $fields = mysql_list_fields("$info[db]", "$info[table]");
 $columns = mysql_num_fields($fields);

 for( $i=0 ; $i<$columns ; $i++ )
 {
  $field[$i]=mysql_field_name($fields, $i);
  if($field[$i]=="nick_name") echo "<th>$field[$i]</th>";
  if($field[$i]=="extra_vars") echo "<th>Number</th>";
 }
?>
</tr>
<?php
 $result = mysql_query("select * from $info[table]");
 while( $data = mysql_fetch_assoc($result) )
 {
  echo"<tr>";
  for( $i=0 ; $i<count($field) ; $i++ )
  {
   if( $field[$i] == "nick_name" ) echo "<td>".$data["$field[$i]"]."</td>";
   if( $field[$i] == "extra_vars" )
   {
    $temp = unserialize($data["$field[$i]"])->확장변수명;
    $temp = explode("|@|", $temp);
    echo "<td>".$temp[0]."-".$temp[1]."-".$temp[2]."</td>";
   }
  }
  echo"</tr>";
 }
?>
</table>
</body>
</html>

 

위에 송동우님과 여러 검색을 통해 했는데  폰번호 쪽만 --로 나오는 현상이 발생하네요 ..

 

50번째 줄  $temp = explode("|@|", $temp); 에서 문제가 발생한다고 나오는데 해결 방안 아시는 분계신가요 ..

 

Warning: explode() expects parameter 2 to be string, array given in /www/call.php on line 50

이러한 형식으로 에러가 납니다.. 

 

 

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
kare**** 관리자모드 로그인 오류 확인 좀 부탁드립니다. ㅜㅜ [4] file 2016.01.05 by kare****
deok ie10, 11번전 css문제  
세상의모든계산기 Ckeditor 인용단락 blockquote 기본 class 지정하는 방법 [2] file 2016.01.05 by 세상의모든계산기
끄으억 사용자가 정보를 조회할 수 있는 페이지는 어떻게 만드나요?  
시지푼수 admin_관리자 페이지에서 index 페이지 링크 문의 드립니다. [2] file 2016.01.05 by 시지푼수
say_oow 회원정보 전화번호 추출 ... 문제 [2] 2016.01.05 by say_oow
멍멍군 스케치북 웹진에서 테두리 색상 조절 [4] file 2016.01.05 by 멍멍군
hellojdy 자꾸질문만올리네요 죄송합니다(마켓플레이스) [2] 2016.01.05 by hellojdy
좀조아 언어설정 질문입니다. [2] 2016.01.04 by 좀조아
별별 링크 미리보기 질문드려요~ file  
hellojdy 타임라인 모듈 게시글 필터 질문있습니다!  
Thunder28 xe 첨부 이미지 본문 자동 삽입 [1] 2016.01.04 by 로이조52
장수발장1 구글링 개인정보 유출 관련 [2] 2016.01.04 by 장수발장1
키에누 제가 만든 html 페이지에서 바로 xe 게시판 디비로 저장하고 싶습니다.  
댑펑 댓글 내용을 검열하고 싶습니다. [2] 2016.01.04 by 댑펑
ing 안녕하세요 xe초보자 질문입니다. [1] 2016.01.04 by bluedream
겨누N 로그인이 안됩니다. [1] 2016.01.04 by bluedream
윤발이 PC 용 홈페이지는 제로 보드 모바일은 다른쪽 연결은? [1] 2016.01.04 by bluedream
nfreerin 위젯 글씨 정렬 관련 문의 [2] file 2016.01.03 by nfreerin
hellojdy 타임라인에서 안보이게 하는법  
둥가 게시판 제목글자 크기를 변경하고 싶습니다. (사진첨부) [2] file 2016.01.03 by 둥가
배우는자 게시판에서 파일업로드시 절대경로에 저장되는 파일명 변환 설명좀요...추가질문도 좀할게요... [1] 2016.01.03 by sejin7940
jetski 홈피에 게시판은 있는데,,,, 추가로 아이디별 다이어리 같은걸 만들고 싶다면???? [1] 2016.01.03 by sejin7940
hellojdy 중고마켓모듈+타임라인 관련 질문입니다!  
메인드블랙 신디케이션로 통한 네이버 노출 링크가 게시판id 누락에 대해서  
lsh4869 게시판 수정 [1] file 2016.01.02 by DoorWeb
서영숙 하루종일 해결못했네요 [1] file 2016.01.02 by DoorWeb
빨간망고 [질문] 최근게시물 추출 제목이 깨지는 경우, 게시자 이름(닉네임) 글자수 제한 방법 [1] file 2016.01.02 by 빨간망고
auddn**** 세이라디오  
쏘쿨쏘핫 [회원그룹] 신입회원/준회원/정회원 등 기본적인 회원그룹 설정이 안됩니다. file