OsakaWebbie
Programmer
As far as I can tell by searching documentation, a comma in regular expressions is not a special character, so if you want to find the first comma, you should be able to just say:
But in my current code, for some reason, ereg is always returning 1, even though the comma is much later in the string (the data is just names: "Last, First"). Here is the whole line of code (including diagnostics in parentheses):
I get the following output (copied from source code view in browser):
Any clues?
Code:
ereg(",",$myvariable)
Code:
echo $title_class . "(".$main_mem->Furigana.":".ereg(",",$main_mem->Furigana).") ".substr($main_mem->Furigana, 0, ereg(",",$main_mem->Furigana)) . "</p>\n";
Code:
<p class="household_title">(Bedow, Mark:1) B</p>