note 18397 modified in function.chop by spic

From: Date: Mon, 26 Aug 2002 19:04:18 +0000
Subject: note 18397 modified in function.chop by spic
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-35676@lists.php.net to get a copy of this message
To get a perl style chop(): $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 "fo" (removes last character) http://www.php.net/manual/en/function.chop.php

« previous php.notes (#35676) next »