"Jason Wong" <[EMAIL PROTECTED]> wrote:

> On Saturday 09 November 2002 14:22, Ian Newlands wrote:
> > Does anyone know of a function, or a method to calculate how many bytes
> > in a string?  Similar to the filesize file system function.
> >
> > Any help would be appreciated.
> Assuming 1 character = 1 byte, then strlen().

Just write the string to a file first then check the filesize. This should
work (I think)
even if you're dealing with multi-byte characters wherein 1 character = 2
(or more?).

There's mb_strlen() but I don't think it'll be useful though...

- E

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

Reply via email to