我想preg_match_all()
這個:如何使用特殊的表達在PHP中使用preg_match_all
if(isset($matches[1])){
return $matches[1];
}else{
return false;
}
}
$lines = file('jason.txt');
$i=0;
foreach ($lines as $line_num => $line) {
$str_arr = getInbetweenStrings('"Vehicle":', ',"Buyer":', $line);
echo '<pre>';
print_r($str_arr);
}
的字符串是'「車輛」:「1992年凱美瑞的強壯男子CE」'? – Mohammad
展示你如何使用'getInbetweenStrings'功能 – RomanPerekhrest
這是一個數組 「QuoteRequestId」 中:343816132, \t \t 「車輛」: 「1992年凱美瑞強壯男子CE」, \t \t 「買家」: 「卡羅來納州車身」, –