Thanks for the quick reply.
Sorry I didn't post more code. I guess I could have, but it didn't seem really relevant. The string is being pulled in from an error file. From there, the lines are cut using split(), and then there is a foreach statement to take in each line one at a time. Here is the code, if it helps:
PHP Code:
$location = './errors.txt';
$file = fopen($location,'r');
$contents = fread($file,filesize($location));
fclose($file);
$contents = split("\n",$contents);
$att = array();
$x = 0;
foreach($contents as $content){
$content = split("\t",$content);
if(@isset($content[4])){
if(preg_match("/SKU '(\d+?\/\d+?)' appears to correspond to ASIN/i",$content[4],$match)){
$att[$x]['sku'] = $match[1];
preg_match_all("/ '(.*?)' Merchant value: '(.*?)' catalog value: '(.*?)'/i",$content[4],$match);
print_r($match);
$x++;
}
}else{ continue; }
}
Everything matches perfect, except that it stops in the wrong place.
Bookmarks