Strip a period at the end of a line...

    Date: 04/19/05 (PHP Community)    Keywords: php, mysql, database, sql

    Greetings... Semi-novie with PHP here. Toyed with it years ago, and just started working on a project that is based in PHP. I'm getting some information from a MySQL database, and I've used str_replace to modify most of what I need, but I'm pulling a domain name from a sentence, so what string_replace leaves me with is 'domain.name.com.'

    I'm trying to get rid of the trailing period, and I've tried using:

    $text="domain.name.com.";

    $newtext=rtrim($text, '.');

    The . does not go away. I've tried with double quotes as well.

    Any help would be most graciously appreciated!




    EDIT: Got it... thanks for all your help!

    Source: http://www.livejournal.com/community/php/288213.html

« Just looking for some... || CGI »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home