note 102801 deleted from function.substr by danbrown
| From: | danbrown@php.net | Date: | Mon, 07 Mar 2011 16:05:12 +0000 |
| Subject: | note 102801 deleted from function.substr by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-177628@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
@Cristianlf:
It's pretty useless if you know how this function works:
<?php
function right($string,$chars)
{
return substr($string, -$chars);
}
echo right('asd', 2); // sd
echo substr('asd', -2); // sd
?>