[PHP] spliting the elements in array

2007-07-04 Thread sivasakthi
Hi Guys,

I have the array like below,

squid %tu %tl %mt %>A
test %st.%hs %>a %

Re: [PHP] Re: spliting the elements in array

2007-07-04 Thread sivasakthi
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 % sivasakthi wrote:
> > Hi Guys,
> > 
> > I have the array like below,
> > 
> > squid %tu %tl %mt %>A
> > test %st.%hs %>a % > 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', '%   array('test1', '%tv', '%tr', '%Hs.%Ss', '%mt')
> );
> 
> or maybe it's:
> array(
>   'squid %tu %tl %mt %>A',
>   'test %st.%hs %>a %   '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 % 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
> 


[PHP] Adding the array in to each element of another one array

2007-07-05 Thread sivasakthi
Hi Guys,

I have a array like that below,

$values = ("name1 %we %tr ", "name2 %de.%ty %sd", "name3  %we 5te %mt/%
Hs");

another one array  like that,

$tmp = ("%tr", "%uy", "%xc");

I need to add the array of $tmp in to each element of array
$values.Also i need to add the $tmp array in to after the name of
each element..
could you help me to find the solution..??


Thanks,



[PHP] How to skipping the range of values from each element of array??

2007-07-21 Thread sivasakthi
Hi All,

I have an array like that below,

array(
'test %ts.%03tu %6tr %>a %Ss/%03Hs %>st %rm %ru %un %Sh/%>A
%mt %rv %>st',
'squid %ts.%03tu %6tr %>a %Ss/%03Hs %>st %rm %ru %un %Sh/%>A
%mt %ea %>st %st %lp'
'tmp %ts.%03tu %6tr %>a %Ss/%03Hs %>st %rm %ru %un %Sh/%>A %
mt %lp %us %ue %ea'
);

In that i need to skip the values from 1 to 10 of each line...

could u help me to  find the solutions??


Thanks in advance