Re: removing text from a string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Seems to me that this would work, assuming at least one space after the '.' in every line:

$string = ltrim($string, "0123456789.");
if ($string[0] == ' ') $string = substr($string, 1);

But perhaps I'm missing something...

I dunno if the OP can guarantee at least one space or not.

I may have missed a followup with that detail.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux