- print_r: documentation ( source)
- preg_match_all: documentation ( source)
- explode: documentation ( source)
<?php
$text = "INVOICE=123456:STATUS=PAID:PAY_TIME=20150525233333:STAN=123456:BCODE=ddd123
INVOICE=123457:STATUS=EXPIRED
INVOICE=123458:STATUS=DENIED";
$lines = explode("\n", $text);
foreach ($lines as $line) {
if (preg_match_all('/(.+)=(.+?)/', $line, $matches)) {
print_r($matches);
}
}