<Original message>
From: Marcos Lloret <[EMAIL PROTECTED]>
Date: Fri, Aug 31, 2001 at 09:53:01AM +0200
Message-ID: <019701c131f1$f57bdfa0$371c94c1@mlloret>
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: [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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to