Question: ```
<w> hello </w> <w> world </w>

```

Hello, I would like to know how to retrieve the following word from an xml file using xquery. E.g. I have assigned 'hello' to $x, how do I return 'world'. Many thanks.

Answer: 
You have to pass strings instead of the variables, but for fun:

```
if(compact('var1', 'var2', 'var3')) {
    echo 'one or more is set';
} else {
    echo 'none are set';
}

```
I guess one could write a simple function to use, but there's probably a cleaner way.

```
function anyset(...$vars){
    foreach($vars as $var){
        if(isset($var)){
            return true;
        }
    }
    return false;
}

if(anyset($var1,$var2,$var3)){}

```