"Markus Stadler" <at****@gmx.de> wrote in message
news:bk**********@online.de...
How can i cut the rest of a string, when i only know that it is
closed with a , ?
Example:
$string = "kyo wa doyoubi desu kara,xxxxxxxxx xx ";
$new = cut_it_right($string);
==> $new == "kyo wa doyoubi desu kara,";
You could try something like
$string = eregi_replace(",.*", "", $string); // first arg is comma dot
asterix - second are two empty quotes
I've not tested the above syntax but I believe it says to replace anything
that follows immediately after the comma with nothing (the empty quotes).