Skip to content
Advertisement

Combine multiple arrays and covert to string

I have two fields

  • first_name
  • last_name

Both are arrays.

I would like to combine the arrays and covert to a human readable string. How can I achieve this?

Here is where I’m at:

JavaScript

How can I get this to output John Doe, Jane Doe?

Advertisement

Answer

Use array_map to combine arrays

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement