This says that strchr finds the last occurrence of a string within a string:
http://www.php.net/manual/en/function.strrchr.php
While this says that strchr is an alias of strstr, which finds the first occurrence of a string within a string:
http://us2.php.net/manual/en/function.strchr.php
In testing it, it seems like the second one is correct. Is the first one a mistake, or was it changed at some point, or something?
strchr confusion
Moderator: General Moderators
Re: strchr confusion
The documentation is correct in both cases, but you mis-read the first one. strchr and strrchr are two different functions.
Re: strchr confusion
Ah, that extra "r". Need to put my glasses on.