$myString = "input/name/something"; $strArray = explode('/',$myString); $name = $strArray[1]; $something = $strArray[2];