Re: Truncating
| From: | Andrew | Date: | Thu, 24 Aug 2000 04:41:29 +0000 |
| Subject: | Re: Truncating | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-13298@lists.php.net to get a copy of this message | ||
It looks like substr will be my answer, but let's say the string I have
is 100 characters long and I'm not sure how many characters it will have.
One time it could be 100 the next time it could be 1000. How would I
accomplish this? I was thinking PHP had a built-in function for this, but
they don't.
BTW, I figured out how to change whitespace to using
eregi_replace ().
Andrew
digi-FX
-------------------------------
http://www.digi-FX.net
----- Original Message -----
From: Andrew <fisherres@msn.com>
To: PHP General <php-general@lists.php.net>
Sent: Wednesday, August 23, 2000 7:12 PM
Subject: [PHP] Truncating
> Hello,
>
> I have a string that I'd like to truncate to a specified amount of
> characters long. This string will then be printed to the browser. How
can
> I truncate the string, and then convert all whitespaces to ?
>
> Thanks!
>
> Andrew
> digi-FX
> -------------------------------
> http://www.digi-FX.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>