//get id from string example - bestloan.pl-12 -> 12 $dataTypeId = substr(strrchr(rtrim($searchIdValue, '-'), '-'), 1);