Sometimes, you may wish to check a POST variable and when it is not set then get a default value. The first approach could be:

However, you could use a simple function to do that:

For example: