how do I concatenate the string values of two arrays pairwise with PHP?

后端 未结 9 1309
傲寒
傲寒 2020-12-21 00:43

So I have two arrays

Array
(
[0] => test
[1] => test 1
[2] => test 2
[3] => test 3
)

and

Array
(
[0] => test         


        
9条回答
  •  自闭症患者
    2020-12-21 01:30

    you loop through it to create a new array. There's no built-in function. Welcome to the wonderful world of programming :)

    Hints:

    • http://pt2.php.net/manual/en/control-structures.foreach.php
    • You can combine two strings with "."

提交回复
热议问题