<?php $string = '1234@#$ABCFG3478&*'; if (preg_match('/[a-z]/i', $string, $match)) { $firstLetter = $match[0]; } else { // there's no letters in string } echo $firstLetter;
You have javascript disabled. You will not be able to edit any code.