$action = ( isset($action) ? $action : "" ); this will initialise $action to an empty string if it has not been assigned a value, If it has been assigned a value then it will retain it.