I want to get what I have saved in the Query database and convert it into an array. Using php
Get the solution ↓↓↓I want to get what I have saved in the Query database and convert it into an array. And I want to pass data to the variables that I have passed. Using php
How can I turn a string below into an array?
"UserID=$api_username&Token=$api_token&Account=$number&Amount=$amount&SPKey=$op&APIRequestID=$ref_id&Optional1={Optional1}&Optional2={Optional2}&Optional3={Optional3}&Optional4={Optional4}&GEOCode=[18.273827, 73.879353]&CustomerNumber=1234567890&Pincode=123456&Format=1"
This is the array I am looking for,
array( "UserID" => $api_username, "Token" => $api_token, "Account" => $number, "Amount" => $amount, "SPKey" => $op, "APIRequestID" => $ref_id, "Optional1" => "{Optional1}", "Optional2" => "{Optional2}", "Optional3" => "{Optional3}", "Optional4" => "{Optional4}", "GEOCode" => "[18.273827, 73.879353]", "CustomerNumber" => "1234567890", "Pincode" => "123456", "Format" => "1" )
I used php parse_url() function but I get such an array.
[ "UserID" => "$api_username" "Token" => "$api_token" "Account" => "$number" "Amount" => "$amount" "SPKey" => "$op" "APIRequestID" => "$ref_id" "Optional1" => "{Optional1}" "Optional2" => "{Optional2}" "Optional3" => "{Optional3}" "Optional4" => "{Optional4}" "GEOCode" => "[18.273827, 73.879353]" "CustomerNumber" => "1234567890" "Pincode" => "123456" "Format" => "1" ]
But I should be Comma Separated.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: git was not found in your path, skipping source download
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.