php - How can I get array like this -


//i have array below: $a =array('1,2,6'); $b =array('2,3,1');  //then using arraycombine : $arr_combine = array_combine( $a, $b );   //output: //array( [1,2,6] => 2,3,1 ) ;  

how can array below?

//output: array( 1=>2, 2=>3, 6=>1 );    

if have array that, have explode element.

$result = array_combine(explode(',', $a[0]), explode(',', $b[0])); 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -