PHP Code:
<?php
$str = "00jkjdj0";
$char_count = 0;
$num_count = 0;
$u_bound = strlen( $str ) - 1;
for( $i = 0 ; $i <= $u_bound ; $i++ ) {
if( is_numeric( $str{ $i } ) ) { $char_count++; } else { $num_count++; }
}
echo $char_count;
echo $num_count;
?>