I have a String Hello This is a String. I need to explode it in PHP only for the First White Space. How is that possible?
Hello This is a String
White Space
An alternative to explode
$str = 'Hello This is a String'; $parts = preg_split('/(\s)/', $str, PREG_SPLIT_DELIM_CAPTURE);