<?php $str = "50+16-0*387/2+49"; $digits = preg_split("/\D+/", $str, 0, PREG_SPLIT_NO_EMPTY); $symbols = preg_split("/\d+/", $str, 0, PREG_SPLIT_NO_EMPTY); var_export($digits); echo "\n---\n"; var_export($symbols);
You have javascript disabled. You will not be able to edit any code.