<?php $tests = [ '152.15 x 12.34 x 11mm', '152.15x12.34x11 mm', '152.15mmx12.34mm x 11mm', ]; foreach ($tests as $test) { var_dump( sscanf($test, '%f%*[mx ]%f%*[mx ]%f') ); echo "\n"; }
You have javascript disabled. You will not be able to edit any code.