<?php $categoria = 'á'; if(preg_match("(^[áéíóúüñÁÉÍÓÚÜÑ ]+$)",$categoria)){ echo 'Existe acento'; }else{ echo 'No Existe acento'; }?>