note 87167 added to function.substr
| From: | geisonfgf at gmail dot com | Date: | Sat, 22 Nov 2008 04:24:38 +0000 |
| Subject: | note 87167 added to function.substr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-146824@lists.php.net to get a copy of this message | ||
Hello people, I needed some times verify if a link have the string h-t-t-p:// then I build this
function to help myself and i hope help you too!
So, Let's go code!
// Verify if file contain the string 'h-t-t-p://' in the begin
// Return nothing or the string 'h-t-t-p://'
function http_exist($link){
$h-t-t-p = '';
if(substr($link,0,6) == 'h-t-t-p://'){
$http = 'h-t-t-p://';
}
return $http;
}
NOTICE: I use - in http because I dont can post with the word http.
----
Server IP: 69.147.83.197
Probable Submitter: 201.40.169.6
----
Manual Page -- http://www.php.net/manual/en/function.substr.php
Edit -- https://master.php.net/note/edit/87167
Del: integrated -- https://master.php.net/note/delete/87167/integrated
Del: useless -- https://master.php.net/note/delete/87167/useless
Del: bad code -- https://master.php.net/note/delete/87167/bad+code
Del: spam -- https://master.php.net/note/delete/87167/spam
Del: non-english -- https://master.php.net/note/delete/87167/non-english
Del: in docs -- https://master.php.net/note/delete/87167/in+docs
Del: other reasons-- https://master.php.net/note/delete/87167
Reject -- https://master.php.net/note/reject/87167
Search -- https://master.php.net/manage/user-notes.php