Re: [PHP] last char in string?

2002-02-14 Thread Rasmus Lerdorf

http://php.net/substr

$rest = substr(abcdef, 0, -1);  // returns abcde

-Rasmus

On Thu, 14 Feb 2002, marcbey wrote:

 hello php guys,
 
 how can i delete the last char in a string?
 
 thanx
 
 
 --
 ---
 magic garden GmbH - Agentur für Informationsarchitektur
 
 Hermannstr. 15 - 70178 Stuttgart (Am Feuersee)
 
 www.magic-garden.de ¦ [EMAIL PROTECTED]
 
 Tel. (07 11) 619 57-42 ¦ Fax (07 11) 615 01 38
 
 
 
 
 


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




Re: [PHP] last char in string?

2002-02-14 Thread val petruchek

$s = substr($s,0,strlen($s)-1);

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: marcbey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 14, 2002 1:48 PM
Subject: [PHP] last char in string?


 hello php guys,

 how can i delete the last char in a string?

 thanx


 --
 ---
 magic garden GmbH - Agentur für Informationsarchitektur

 Hermannstr. 15 - 70178 Stuttgart (Am Feuersee)

 www.magic-garden.de ¦ [EMAIL PROTECTED]

 Tel. (07 11) 619 57-42 ¦ Fax (07 11) 615 01 38




 --
 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