note 113718 added to function.substr
| From: | greg at apparel dot com | Date: | Wed, 20 Nov 2013 17:28:23 +0000 |
| Subject: | note 113718 added to function.substr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-197575@lists.php.net to get a copy of this message | ||
Coming to PHP from classic ASP I am used to the Left() and Right() functions built into ASP so I did
a quick PHPversion. hope these help someone else making the switch
function left($str, $length) {
return substr($str, 0, $length);
}
function right($str, $length) {
return substr($str, -$length);
}
----
Server IP: 64.71.164.2
Probable Submitter: 71.92.182.34
----
Manual Page -- http://php.net/manual/en/function.substr.php
Edit -- https://master.php.net/note/edit/113718
Del: integrated -- https://master.php.net/note/delete/113718/integrated
Del: useless -- https://master.php.net/note/delete/113718/useless
Del: bad code -- https://master.php.net/note/delete/113718/bad+code
Del: spam -- https://master.php.net/note/delete/113718/spam
Del: non-english -- https://master.php.net/note/delete/113718/non-english
Del: in docs -- https://master.php.net/note/delete/113718/in+docs
Del: other reasons-- https://master.php.net/note/delete/113718
Reject -- https://master.php.net/note/reject/113718
Search -- https://master.php.net/manage/user-notes.php