$ data = array();
foreach($con as $line){
if(stripos $ line,":")= = = false & amp& ampstripos($line,":")=== false){
繼續;
}
$ line = trim($ line);
$ line = preg _ split("/\ s *[::]\ s */ISU ",$ line);
$ data[]= array(" name " = & gt;$line[0]," value " = & gt$ line[1]);
}
var _ dump($ data);