<?php $foo = trim(' {555555 123456 123456} {666666 654321 654321} {777777 123456 123456} '); $items = []; if (preg_match_all('/^{[\d]{1,} ([\d]{1,}) ([\d]{1,})}$/m', $foo, $matches)) { $items = array_reduce( array_slice($matches, 1), fn(array $found, array $match) => array_merge($found, $match), [] ); } var_dump($items);
You have javascript disabled. You will not be able to edit any code.