<?php $str = 'cream 100g'; $p = strcspn($str, '0123456789'); $before = substr($str, 0, $p); $after = substr($str, $p); echo "before: $before, after: $after";
You have javascript disabled. You will not be able to edit any code.