Welcome Guest, Not a member yet? Register   Sign In
Array problem codeigniter with mongoDB
#1

[eluser]zacksyah[/eluser]
Please help me, i have a case that must be solve immediately due to strict deadline.. Sad I have an idea using preg_match or preg_split to solve this, and had tried so many way to use it but still not understand how to use it. Maybe someone could guide me, about this case so i could get more understanding about how to use preg_match or preg_split.
from this string
Code:
$temp = "{foo:bar,bar:foo},{_id:1,nama:1,nim:1}";
how to assign it to array so the result will be like this
Code:
Array
(
[0]=>foo:bar,bar:foo
[1]=>_id:1,nama:1,nim:1
)
also the second string
Code:
$temp2 = "_id:1,nama:1,nim:1";
how to assign it to array so the result will be like this
Code:
Array
(
[0] => _id
[1] => nama
[2] => nim
)
Thank you for your guidance and the help.. Smile




Theme © iAndrew 2016 - Forum software by © MyBB