dimanche 21 juin 2015

PHP - If a string or variable begins with a vowel

I did a if thing to check if the variable only had aplha caracter but I also want to check if the variable strated with a vowel.

if (ctype_alpha($original)) {
        print "oké";
    }
    else {
        print "pas oké";
    }

If there isn't any specific function, how could I know ? Thank you

Aucun commentaire:

Enregistrer un commentaire