<?php $string = 'word1&word2 !word3 word4 &word5'; var_export( preg_split('/ |(?=[&!])/', $string, 0, PREG_SPLIT_NO_EMPTY) );
You have javascript disabled. You will not be able to edit any code.