"'Mr A'" <a@x.com>,
"'Mrs B'" <b@x.com>,
So far I have exploded all the data by " which has left me with lines of the following:
'A'
,
'B'
,
Then I've used the following code to go through each line and find the first ' and the 2nd ' and then use substr to put everything inbetween into another variable, using the following code.
Code: Select all
$toSplit = explode("\"", $toInsert);
foreach($toSplit as $a) {
$start[$i] = strpos($a, "\"");
$end[$i] = strpos($a, "\"", $start[$i]);
$out[$i] = substr($a, $start[$i], $end[$i]);
$i++;
}Can anybody see why in this example?
Regards,