NYCPHP Meetup

NYPHP.org

[nycphp-talk] rtrim broken?

David Krings ramons at gmx.net
Tue Oct 31 20:33:11 EST 2006


Hi,

I have a string that looks like this
$text = 'blah, blah, blah, ';
I want to use rtrim to cut off the last comma and the whitespace. So I use
rtrim($text, ', ');

To my surprise, it doesn't cut anything off. When I echo $text the comma
and the space are still there.

Is rtrim broken or my logic or my script?

David K.




More information about the talk mailing list