Re: [PHP] Re: String manipulation

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

 



What about something like this:

$pos = (strpos(' ', $string, 76))?strpos(' ',$string, 76):strlen($string);

Thanks,
Ash
http://www.ashleysheridan.co.uk

----- Reply message -----
From: "Ron Piggott" <ron.piggott@xxxxxxxxxxxxxxxxxx>
Date: Sun, Nov 14, 2010 20:48
Subject: [PHP] Re: String manipulation
To: <php-general@xxxxxxxxxxxxx>


How would I write an IF statement that looks for the first space space (â â) left of the 76th character in a string or <br>, which ever comes first --- OR the end of the string (IE the string is less than 76 characters long? I specifically want is itâs character position in the string.  Ron

The Verse of the Day
âEncouragement from Godâs Wordâ
http://www.TheVerseOfTheDay.info

[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