sivasakthi wrote:
Thanks for your response.. Actually i have the collections of strings like, $not_quite_an_array = 'squid %tu %tl %mt %>A test %st.%hs %>a %<m %tu %th %Hs %Ss test1 %tv %tr %Hs.%Ss %mt'; from that i need to split name of each line..
$names = array(); foreach (explode("\n", $not_quite_an_array) as $line) { $line = trim($line); if (strlen($line) == 0) continue; $names[] = array_shift(explode(' ', $line, 2)); } -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php