Answer the question
In order to leave comments, you need to log in
How to get a list from an array?
Guys, help. We have an array of the form:
(a,b,c,d)
(k,l,m,n,o)
...
The number of elements in each line is different. It is necessary to get a list of the following output:
(a,b)
(a,c)
(a,d)
(k,l)
(k,m)
(k,n)
(k,o)
Please help with the solution in the form of php code
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
We make a shift and save the first element php.net/manual/ru/function.array-shift.php
The rest is bypassed in any convenient way, for example foreach
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question