note 126705 added to function.strpos

From: Date: Wed, 22 Dec 2021 11:48:51 +0000
Subject: note 126705 added to function.strpos
Groups: php.notes 
Request: Send a blank email to php-notes+get-217405@lists.php.net to get a copy of this message
For what it worth to mention, to just check if it is true or not that a string exist into another, may this is a way <?php if( is_int(strpos( '/adm2/php/adm/index.php', '/adm')) ) { echo'found0 '; // found } if( is_int(strpos( '/adm2/php/adm/index.php', '/adm2')) ) { echo'found1 '; // found } if( is_int(strpos( '/adm2/php/adm/index.php', '/adm22')) ) { echo'found2'; // not found } ?> ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.135 (proxied: 2.34.191.205) ---- Manual Page -- https://php.net/manual/en/function.strpos.php Edit -- https://main.php.net/note/edit/126705 Del: integrated -- https://main.php.net/note/delete/126705/integrated Del: useless -- https://main.php.net/note/delete/126705/useless Del: bad code -- https://main.php.net/note/delete/126705/bad+code Del: spam -- https://main.php.net/note/delete/126705/spam Del: non-english -- https://main.php.net/note/delete/126705/non-english Del: in docs -- https://main.php.net/note/delete/126705/in+docs Del: other reasons-- https://main.php.net/note/delete/126705 Reject -- https://main.php.net/note/reject/126705 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#217405) next »