I would like to generate a large array with a incremental key and empty value.
I tried:
$array = array();
for($i=1; $i <= 1000000; $i++)
$array[$i] = '';
print_r($array);
thrown exception:
Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 131072 bytes)
What is the most efficient way?