Linkslistforum
  • PHP
  • jquery
  • html
  • css
  • mysql
  • sql
  • android
  • java
  • More

Is there a way to convert query string into an array?

     

I have a string like this:


"cart[GA117110020001]=0&cart[CA117210020001]=0&cart[ZA117210020001]=0"  

What i try to do:


name_of_array[index]=value  cart[GA117110020001]=0  

Is there a way to make an associative array called cart with index'es between '[ ]' and value after '='. Maybe i will do this by regular expression but im interesting if there is simpler solution.

  
"
answer1
  
  

As you have a query string here



Related

eliminate formatting changing when printing Reports in HTML format
Callback on offline Plugin Openfire
Call to undefined method CI_Loader::libary()
Get only different month and date from table
While installing magento I am getting an error : Parse error
php select reords from database on citeria of another table
Git how to view the change history/deletion of a function?
PHP echoing from within a nested while loop
Use shell script to execute java saxon transform to create file
Minimum integer in PHP 7

New

Laravel 5.3 Validation unique
Notice: Undefined index: buy in C:xampphtdocsFinalYearProjectcheckout.php on line 28 [duplicate]
How to display an image on a HTML webpage which is outside web root directory
Installing composer in a docker image
FOSCommentBundle how to implement
Changing parsed local href in php
zf2 TwbBundle button group inside fieldset
How to fetch pivot data in php from mssql
PHP - Update don't want to update [duplicate]
Non-existing handler on IIS

©2017 Linkslistforum. All rights reserved.