TsarAlex
Note: It is easy to mistake the return values for "character found at position 0" and "character not found". Here's how to detect the difference:
// in PHP 4.0b3 and newer:
$pos = strpos($mystring, "b");
if ($pos === false) { // note: three equal signs
// not found...
}
// in versions older than 4.0b3:
$pos = strpos($mystring, "b");
if (is_string($pos) && !$pos) {
// not found...
}