Reputation: 366
This is the array i've received in my controller from doing a POST which is built dynamically based on the number of inputs given by the user.
I would like to convert it into a string in my controller which would produce something like "test3 or test2 or test" to use in a PHP exec.
Upvotes: 1
Views: 71
Reputation: 163788
You can use implode()
:
implode(' or ', $array['emailVal'])
Upvotes: 7