How can two two-dimensional arrays be combined into one array, with one as a key and the other as a value? ? ?
myfey
myfey 2017-12-01 11:08:44
0
1
1747

Array 1:

$devicename = array(

      array('t0001'),

      array('t0002'),

Array('t0003'),

);

Array 2:

$arrstatus = array(

                                                                                                                        use using using                 ‐ ’ s ’ s ‐ ‐ ‐ ‐ ‐ 'status' => '1',

##                 'online_status' =>'1',

                                                               Array (

'STATUS' = & GT; '1',

## 'Online_status' = & GT

'STATUS' = & GT; '1',

## 'ONLINE_STAS' = & GT; '1',

#),

); ##)

# The method of merging one-dimensional arrays found online (but it cannot be used)

$savearrays = array_combine($devicename,$arrstatus);

var_dump($savearrays);die;

The final desired effect is:

array (size=3)
't0001' =>

array (size=2)

'status' => string '1' (length=1)

'online_status' => string '1' (length =1)

't0002' =>

array (size=2)

'status' => string '1' (length=1)
'online_status' => string ' 1' (length=1)

't0003' =>

array (size=2) 'status' => string '1' (length=1) 'online_status' = > string '1' (length=1)

myfey
myfey

reply all(1)
myfey

How do you combine two two-dimensional arrays, one of which serves as a key and the other as a value, into one array? ? ?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template