note 71977 deleted from function.rtrim by bjori

From: Date: Wed, 27 Dec 2006 14:29:51 +0000
Subject: note 71977 deleted from function.rtrim by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-120954@lists.php.net to get a copy of this message
Note Submitter: tiny_green Reason: bad code ---- If there is no '.' at the end when you use rtrim($text, '.') nothing will happen. It is not true that it will delete the last word. You can check it with: <?php $text = "This string contains no . at the end"; $trimmed = rtrim($text, '.'); echo $trimmed; // prints: This string contains no . at the end ?>

« previous php.notes (#120954) next »