how could I explode each elements in an array?
Array
(
[0] => countryId:2, productId:1, status:1, pId:18, xId:pdgje5566
)
please see below for above array:
$searchfor = $xId;
header('Content-Type: text/plain');
$contents = file_get_contents($file);
$pattern = preg_quote($searchfor, '/');
$pattern = "/^.*$pattern.*\$/m";
// search, and store all matching occurences in $matches
if(preg_match_all($pattern, $contents, $matches)){
print_r($matches[0]);
//echo implode("\n", $matches[0]);
}
please advise, thanks.