note 8005 added to strpos

From: Date: Wed, 23 Aug 2000 20:55:04 +0000
Subject: note 8005 added to strpos
Groups: php.notes 
Request: Send a blank email to php-notes+get-3042@lists.php.net to get a copy of this message
Just a function to strip the first char. This function checks if the char given is the first char of the given string, if so... strip it... function stripFirstChr($firstChr,$string){ if(strpos("_".$string,"$firstChr")==1){ return substr($string,1); }else{ return $string; } } http://www.php.net/manual/function.strpos.php

« previous php.notes (#3042) next »