When I try to print the array returned from this function, I get a blank screen.
My array $terms
and $definitions
are both the same length and they exist before and after I call make_associative_array()
.
function make_associative_array() {
return array_combine($terms, $definitions);
}
$c = make_associative_array();
print_r($c);
$terms:
Array (
[0] => Nock (verb) [1] => End [2] => Serving [3] => Nock (noun)
)
$definitions:
Array (
[0] => To place an arrow against the string prior to shooting. [1] => A group of arrows shot during a tournament. Usually 6. [2] => Thread wound around a bow string to protect the string. [3] => A notch at the rear of an arrow. The bow string is placed in the nock.
)
I am using PHP 5.6.27