note 75450 added to function.strpos

From: Date: Wed, 30 May 2007 15:35:55 +0000
Subject: note 75450 added to function.strpos
Groups: php.notes 
Request: Send a blank email to php-notes+get-127035@lists.php.net to get a copy of this message
This checks the String $user_site and when the String is not empty and there is no http:// this will it add in the beginning of the String. <?php $http = 'http://'; $pos = strpos($user_site, $http); if ($pos === false && !empty($user_site)) { $user_site = $http.$user_site; } ?> by http://basti.funhome.de ---- Server IP: 212.124.37.9 Probable Submitter: 172.178.14.134 ---- Manual Page -- http://www.php.net/manual/en/function.strpos.php Edit -- https://master.php.net/note/edit/75450 Del: integrated -- https://master.php.net/note/delete/75450/integrated Del: useless -- https://master.php.net/note/delete/75450/useless Del: bad code -- https://master.php.net/note/delete/75450/bad+code Del: spam -- https://master.php.net/note/delete/75450/spam Del: non-english -- https://master.php.net/note/delete/75450/non-english Del: in docs -- https://master.php.net/note/delete/75450/in+docs Del: other reasons-- https://master.php.net/note/delete/75450 Reject -- https://master.php.net/note/reject/75450 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#127035) next »