note 18397 modified in function.chop by vrana

From: Date: Tue, 17 Aug 2004 14:54:32 +0000
Subject: note 18397 modified in function.chop by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79668@lists.php.net to get a copy of this message
To get a perl style chop(): <?php $foo = "bar"; $foo = substr("$foo", 0, -1); echo $foo; //returns "ba" (removes last character) ?> --was-- To get a perl style chop(): $foo = "bar"; $foo = substr("$foo", 0, -1); echo $foo; //returns "ba" (removes last character) http://php.net/manual/en/function.chop.php

« previous php.notes (#79668) next »