<?php
$cp="my name is abcd";
$arr = array();
$pos=0;
While(strpos($cp, " ", $pos+1) != ""){// Keep going as long as there is spaces left in string
$arr[] = trim(substr($cp, $pos, strpos($cp, " ", $pos+1)-$pos));
$pos = strpos($cp, " ", $pos+1); //next space position
}
$arr[] = substr($cp, $pos+1); //catch the last one after loop +1 because POS is the space position.
Var_dump($arr);