I have a string
$tailored_information="3, 5, 10, 13, 7, 6";
Now I have need to make an array like
$input_array = array("Id" => 3, "Id" => 5);
I am using this but not work cause i cant add key ID
explode(",", $tailored_information)
I have a string
$tailored_information="3, 5, 10, 13, 7, 6";
Now I have need to make an array like
$input_array = array("Id" => 3, "Id" => 5);
I am using this but not work cause i cant add key ID
explode(",", $tailored_information)
An array has to have unique keys. Also, you will now have spaces in your values
What you could do is explode by ", "
and then take that array as your array straight away. If the key you want/need is always "Id" then it doesn't matter anyway.