you should change code: $version = intval(ereg_replace('[[:alpha:][:space:]()]+', '', $gdinfo)); to preg_match('/\d/', $gdinfo, $match); $version = $match[0]; :-*
More