note 101740 deleted from function.strlen by hholzgra
| From: | hholzgra@php.net | Date: | Thu, 02 Aug 2012 12:17:17 +0000 |
| Subject: | note 101740 deleted from function.strlen by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189622@lists.php.net to get a copy of this message | ||
Note Submitter: canschi dot sergiu at yahoo dot com
----
Hello all,
May I pos my firs function as novice in php here .
This funtion count all characters in a strign without spaces , so only chars, no spaces .
<?php
function countchar ($string) {
$result = strlen ($string) - substr_count($string, ' ');
echo $result;
}
countchar ($a);
?>
Hope to be useful for somebody !