Create an array by using the elements from one "keys" array and one "values" array:
The array_combine() function creates an array by using the elements from one "keys" array and one "values" array.
Note: Both arrays must have equal number of elements!
| Parameter | Description |
|---|---|
| keys | Required. Array of keys |
| values | Required. Array of values |
| Return Value: | Returns the combined array. FALSE if number of elements does not match |
|---|---|
| PHP Version: | 5+ |
PHP Array Reference
Your message has been sent to W3Schools.