<?php $string = "Hello World Hey How Are You Doing"; $res = preg_match_all("/(?|(?:^|\h)(?=(\S+(?: \S+){2}))|(\S+))/", $string, $matches); print_r($matches[1]);
You have javascript disabled. You will not be able to edit any code.