<?php $str = "20x9999,24x65,40x5"; $one = []; $two = []; foreach (explode(',', $str) as $set) { sscanf($set, '%dx%d', $one[], $two[]); } var_dump($one, $two);
You have javascript disabled. You will not be able to edit any code.