<?php
$str = "hi-my-name-is-khan"; 

$strParts = explode("-", $str);
echo "Original String = $str <br />";
echo "First part = $strParts[0]<br />";
echo "Second part = $strParts[1]<br />";
echo "Third part = $strParts[2]<br />";
echo "Fourth part = $strParts[3]<br />";
echo "Fifth part = $strParts[4]<br />";
?>