(non blog related post) Needed to use this php function: strchr (alias to strstr).
I had a field that had a person's full name (first and last). 99.999% of the time, the first name and last name were seperated by a space (no Mr. or Mrs. in there) and I needed a script that assumed as such and grabbed what was more than likely the person's first name. I found the script below on that strchr function page.
<?php
$fullname = $row['customername'];
$toFind = " ";
echo str_replace( strchr($fullname, $toFind), "", $fullname );
?>
so if $row['customername'] was "Jane Smith"… the script above would return just "Jane"