Home  >  Q&A  >  body text

PHP array splicing

Array
(
    [0] => stdClass Object
        (
        [id] => 1
        [user] => test
        )
)
Array
(
    [0] => stdClass Object
        (
        [addtime] => 2021-8-25
        [password] => 123456
        )
)

How to merge the above two arrays into the following array? Can you give me the code? Thank you.

Array
(
    [0] => stdClass Object
        (
        [id] => 1
        [user] => test
        [addtime] => 2021-8-25
        [password] => 123456
        )
)

金牌马甲金牌马甲1172 days ago939

reply all(1)I'll reply

  • 猪老湿

    猪老湿2021-08-26 08:44:13

    Merge arrays The array_merge() function merges arrays together and returns a combined array

    reply
    2
  • Cancelreply