I have a string :
$productList="
Saluran Dua(Bothway)-(TAN007);
Memo-(T-Memo);
7-Pak FBIP R-100.000-(F1R100);
FBIP LOKAL 350 Mnt (R/N/M)-(FL350);
FBIP SLJJ 30+300 Mnt (R)-(FJ30R)
";
i want the result like this:
Array(
[0]=>Saluran Dua(Bothway)
[1]=>Memo
[2]=>7-Pak FBIP R-100.000
[3]=>FBIP LOKAL 350 Mnt (R/N/M)
[4]=>FBIP SLJJ 30+300 Mnt (R)
);
I used :
$separator = '#\;([a-zA-Z/0-9()\- ]*)\-#';
preg_match_all($separator, $productList, $match);
$value=$match[1];
but the result:
Array(
[0] => Saluran Dua Arah(BothWay)
[1] => Memo-(T
[2] => 7-Pak FBIP R
[3] => FBIP LOKAL 350 Mnt (R/N/M)
);
i hope someone can help me..