Try the following code, please note you may want to trim() the string as
well if it is coming from a user.

<?php
        $char = 'hello world';

        $number_characters = strlen(str_replace(' ', '', $char'));
?>

Jason


On Sun, 2003-01-12 at 10:32, [EMAIL PROTECTED] wrote:
> I want to count characters without space "character".
> $char="hello world"
> so the result should be 10.
> Can anybody help me?
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to