PHP: Separate 2 or more values of 1 key in Array -


i have array came ajax

$contestant_name_arr = $_get['contestant_name_arr']; print_r($contestant_name_arr); 

whenever try value of each in loop got error because instead of this

array ( [0] => value1,value2 ) 

it should this:

array (      [0] => value1      [1] => value2 ) 

how separate in example above.

either devise url query string be:

http://yourhost.com?contestant_name_arr[0]=value&contestant_name_arr[1]=value2 

or explode;

$contestant_name_arr = explode(',', $contestant_name_arr[0]); 

Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -