php default value to var code example Example: php assign value to variable with default $default_carat_min = $_COOKIE["diamond-search_caratMin"] ?: "0.25";