i'm trying to do a thing but i don't know how :) I have a php string in this format:
$test = (1 / 2015-11-2 11:11:11, 2 / 2015-07-07 11:11:11, ......)
I need a function that process that string to get as format:
$testarray = array(
"id" => "1",
"date" => "2015-11-2 11:11:11",
"id" => "2",
"date" => "2015-07-07 11:11:11",
.....
);
I thought these steps:
1) find how many comma are present in $test string using
substr_count($test, ",");
2) take the string before the comma and find in this string value " / "
3) Create the array
Can you help me?
idor twodatecan't be in one array.