i have some data in an Array but i want only a particular part of it..!!
how can i get it..
for Example...
Array
(
[0] => status=1&messages=xxxxxxxxx&credit=23.4;
)
i just want to get status = 1
how can i get it..?? help me out...!! :(
i have some data in an Array but i want only a particular part of it..!!
how can i get it..
for Example...
Array
(
[0] => status=1&messages=xxxxxxxxx&credit=23.4;
)
i just want to get status = 1
how can i get it..?? help me out...!! :(
you can achive this by using explode function
suppose you have info. in array like
$array[0]
now by using explode function:
$exploded= explode('&',$array[0]);
now $exploded[0] will contain status=1
i hope this helps you.
i thnk explode convert string into array..!!
.
.
but here value itself an array.... does it work.?
Okay i have tested... its working pretty fine with explode..!!!!
.
.
.
thnx maan..!!! :)
$arr = explode("&",$lines[0]);
print_r($arr[0]);
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.