Jump to content

Number of letters?


BBGaming

Recommended Posts

not sure if ds s wat u want...

8s how i understand ur prob...

 

<?php

 

$str = 'a2b5cdef23g9=#';

$str_letters_only = preg_replace('/[^a-z]/','',$str);

$num_letters = strlen($str_letters_only);

 

print "$str_letters_only\n$num_letters\n";

 

?>

 

Link to comment
https://forums.phpfreaks.com/topic/62608-number-of-letters/#findComment-311658
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.