I'm trying to write a php function that will grab the first letter from a long string ("ZT-FUL-ULT-10SF-S" would return "Z").

Some of the strings start with numbers, and for those, the function needs to return "#".

```
function returnFirst($rsrnum)  {
    substr("$rsrnum", 0, 1); {
        echo "$rsrnum";
    } 
}

```

That's as far as I've gotten. How would I differentiate between numbers, and if it is a number, return #?

Thanks!

Edit: Seems to be working like a champ with:

`function returnFirst($rsrnum) {
 $char = substr($rsrnum, 0, 1);
 return ctype_alpha($char) ? $char : "#";
}`

Thanks!