array of string to array of int php code example Example: php array map cast to int $integerIDs = array_map('intval', explode(',', $string));