$str = \"This is a string\"; $words = explode(\" \", $str);
Works fine, but spaces still go into array:
$words === array (\'This
$financialYear = 2015-2016;
$test = explode('-',$financialYear); echo $test[0]; // 2015 echo $test[1]; // 2016