[請益] 關於Warning:explode() expects parameter 2 to be string

看板PHP作者 (return false;)時間15年前 (2010/08/22 22:49), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
各位好~ 小弟是php初學者 在使用explode()函數時 //$text由外部傳入 if(isset($text)){ $text = explode(",",$text); }else{ $text = ""; } echo $text[0].$text[1]; 遇到了下列的錯誤訊息 Warning:explode() expects parameter 2 to be string,......... 想請教這是那裡出問題 該怎麼解決呢? 感激不盡~謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.165.44.52

08/22 23:50, , 1F
在 explode() 前 call var_dump($text)吧 天知道傳什麼進來
08/22 23:50, 1F
文章代碼(AID): #1CSJaLBV (PHP)
文章代碼(AID): #1CSJaLBV (PHP)