Its syntax is: int strpos (string string, string occurrence [, int offset]) offset specifies the position at which to begin the search. <? $log = "1999-01-31"; $pos = strpos($log, "1999"); print $pos; ?>