Php > Complete Programs
Look for the position of the first occurence of string2
Look for the position of the first occurence of string2 /* Look for the *position* of the first occurence of string2 in string1, beginning at position start. */ function InStr($Start, $String1, $String2) { $i = $Start; while ($i < strlen($String1) - strlen($String2)) { if (substr($String1, $i, strlen($String2)) == $String2) { return $i; exit(); } $i++; } return 0; } ?>
Php Codes
Algorithms
Arrays
Authentication
Calendar
Code Snippets
Programs
Content Manage
Contest Related
Cookies
Credit Cards
DBase Related
Databases
Date Time
Directories
E-Mail
Errors
File
File System
Forms
Handling
Graphics
HTML and PHP
Informix
Ingres
InterBase
LDAP
Look and Feel
Miscellaneous
MySQL
Other
PHP Classes
Searching
Navigation
Statistics
Strings
User Manage