- array_chunk: documentation ( source)
- print_r: documentation ( source)
- preg_split: documentation ( source)
<?php
$str = <<<TEXT
~THE BURGER ZERO~
No burger, no bun, just air.
~TRICKY TEST~
Meet me ~5pm.
~THE BURGER ITALIANO~
A soft mix of ground beef & mozzarella stuffed between two pillowy pieces of pasta.~NOTE~This is basically giant ravioli.
~THE BURGER MINI~A tiny little burger patty in a tiny little bun.
TEXT;
$pattern = '/ \s* ~ ( [\p{Lu} ]+ ) ~ \s* /ux';
$arr = preg_split($pattern, $str, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
print_r(array_chunk($arr, 2));