Date: 08/31/01
- Next message: Andrey Hristov: "Re: [PHP] assosiative array in php"
- Previous message: Jon Haworth: "RE: [PHP] 2 General MySQL Questions"
- In reply to: Marcos Lloret: "[PHP] just 10 characters from a string"
- Next in thread: Alexander Skwar: "Re: [PHP] just 10 characters from a string"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
<Original message>
From: Marcos Lloret <mlloret <email protected>>
Date: Fri, Aug 31, 2001 at 09:53:01AM +0200
Message-ID: <019701c131f1$f57bdfa0$371c94c1 <email protected>>
Subject: [PHP] just 10 characters from a string
> hi to all,
> i have a long string (about 255 characters) and i would like to show only 10. how can i do it?
>
> thanks in advance,
>
> marcos
</Original message>
<Reply>
When it's about _showing_ 10 characters, and not to change the
string itself:
$yourString = "abcdefghijklmnopqrstuvwxyz";
printf ("%.10s", $yourString);
</Reply>
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze <email protected> -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andrey Hristov: "Re: [PHP] assosiative array in php"
- Previous message: Jon Haworth: "RE: [PHP] 2 General MySQL Questions"
- In reply to: Marcos Lloret: "[PHP] just 10 characters from a string"
- Next in thread: Alexander Skwar: "Re: [PHP] just 10 characters from a string"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

