note 18397 deleted from function.chop by felipe
| From: | felipe@php.net | Date: | Fri, 04 Jan 2008 01:37:37 +0000 |
| Subject: | note 18397 deleted from function.chop by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134740@lists.php.net to get a copy of this message | ||
Note Submitter: bernard dot SPAM at mindfiredesign dot SPAM dot co dot uk
----
To get a perl style chop():
<?php
$foo = "bar";
$foo = substr("$foo", 0, -1);
echo $foo;
//returns "ba" (removes last character)
?>