2013-12-18 65 views

回答

3

使用explode

$p_list = "1,2,3,4"; 
$array = explode(',', $p_list); 

Codepad

1

嘗試爆炸$a=explode(",","1,2,3,4");

0

試試這個:

In PHP, explode function will convert string to array, If string has certain pattern. 

<?php 
     $p_list = "1,2,3,4"; 

     $noArr = explode(",", $p_list); 

     var_dump($noArr); 
?> 

You will get array with values stores in it. 
  • 感謝