View Single Post
Old 03-16-2005, 01:40 AM  
broke
Confirmed User
 
Join Date: Aug 2003
Location: Someplace Windy
Posts: 4,501
PHP Code:

<?php

  $str 
"00jkjdj0";
  
  
$char_count 0;
  
$num_count 0;
  
  
$u_bound strlen$str ) - 1;
  
  for( 
$i $i <= $u_bound $i++ ) {
  
    if( 
is_numeric$str$i } ) ) { $char_count++; } else { $num_count++; }
  
  }
  
  echo 
$char_count;
  echo 
$num_count;
  
?>
broke is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote