<?php $hits = []; preg_match_all("/(?<=\s)\w/", " this is a string ", $hits, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE); $result = array_column ( $hits[0], 1 ); $s_result = join ( ", ", $result); echo $s_result;
You have javascript disabled. You will not be able to edit any code.