<?php $string = "PHP What is PHP"; do { $result[] = $string; $string = preg_replace('/\s+\S+$/', '', $string, 1, $count); } while ($count); var_export($result);
You have javascript disabled. You will not be able to edit any code.