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.. Thanks.. On Wed, 2007-07-04 at 11:26 +0200, M. Sokolewicz wrote: > sivasakthi wrote: > > Hi Guys, > > > > I have the array like below, > > > > squid %tu %tl %mt %>A > > test %st.%hs %>a %<m %tu %th %Hs %Ss > > test1 %tv %tr %Hs.%Ss %mt > > ............ > > > > In that i need to split the log name of each line, example : > > squid,test,test1 in to another array.. > > could you help me to find the solution? > > > > > > Thanks, > > Siva > > > > What does your array look like _exactly_? ie. var_dump style output. > Is it: > array( > array('squid', '%tu', '%tl', '%mt', '%>A'), > array('test', '%st.%hs', '%>a', '%<m', '%tu', '%th', '%Hs', '%Ss') > array('test1', '%tv', '%tr', '%Hs.%Ss', '%mt') > ); > > or maybe it's: > array( > 'squid %tu %tl %mt %>A', > 'test %st.%hs %>a %<m %tu %th %Hs %Ss', > 'test1 %tv %tr %Hs.%Ss %mt' > ); > > or maybe it's not even an array at all yet, but still a string, and you > just misnamed it? (ie.) > $not_quite_an_array = > 'squid %tu %tl %mt %>A > test %st.%hs %>a %<m %tu %th %Hs %Ss > test1 %tv %tr %Hs.%Ss %mt'; > > Anyway, the answer heavily depends on what you actually have and want > (exactly). Give us the expected _input_ and expected _output_ and we'll > be able to help you; without those, we won't be. > > - Tul >