How to splice an array to insert array at specific position?

后端 未结 1 783
情书的邮戳
情书的邮戳 2020-12-19 00:38
$custom = Array(
            Array(
                \'name\'  =>  $name1,
                \'url\'   =>  $url1
            ),
            Array(
                        


        
相关标签:
1条回答
  • 2020-12-19 01:09

    array_splice­Docs takes an array of elements to insert. So the call should actually be

    array_splice($custom, 1, 0, array($bread_elem));
    
    0 讨论(0)
提交回复
热议问题