Azu Posted November 16, 2007 Share Posted November 16, 2007 On some pages on my site, I need to make a big array. The problem is this; the total time of running all the PHP on the page is about 12ms, and without the variable it is about 5ms. So it's making it take over twice as long. Is there a way to create the array faster? I'm basically doing it like this right now $array=array( 'ab'=>array('ab'=>'blah',5=>'foo','xx'=>'bar',9=>'moooo','cd'=>'blah blah blah',7=>'test(abc)'), (about 200 or so of these) ) Quote Link to comment Share on other sites More sharing options...
Orio Posted November 16, 2007 Share Posted November 16, 2007 Is there any logic behind the structure of the array, some kind of "fomula"? Orio. Quote Link to comment Share on other sites More sharing options...
Azu Posted November 16, 2007 Author Share Posted November 16, 2007 Basically the main arrays are 2 letter strings and the sub arrays are a mix of 2 letter strings and 1 to 2 number integers that are set to strings of usually between 1 and 3 words $array=array( 'aa'=>array('ab'=>'Blah blah',3=>'Some words','xy'=>'A little sentence',27=>'BLAH'), 'wx'=>array(99=>'Foo',12=>'Bar','lm'=>'Doo dee doo','hi'=>'La de la','5=>'Another string'), etc (about 200 of these) ); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.