php multidimensional arrays, memory management
Posted
by srk
on Stack Overflow
See other posts from Stack Overflow
or by srk
Published on 2010-03-23T19:12:06Z
Indexed on
2010/03/23
19:13 UTC
Read the original article
Hit count: 324
i need a structure like this
array(){ [0] => array(){ [0] => array(){ // this array will have 'n' values(n is large, like 2000) } [1] => array(){ // this array will have 'n' values(n is large, like 2000) } } . . . . [n] => ............
n arrays will each have a 2 element array, where each element has an array of n values.
I used $list[$m][0][$n] and $list[$m][1][$n] inside 2 for loops where $m,$n vary from 0...2000
this crosses the allowed memory size.. i can change the size in php.ini, but i want to optimize my memory usage and not change the limit.
will using objects help ?
Please provide some sample code to understand. Thank you.
© Stack Overflow or respective owner