Problems with PHP when trying to create big array

前端 未结 3 774
鱼传尺愫
鱼传尺愫 2020-12-28 19:17

Here is my code, which creates 2d array filled with zeros, array dimensions are (795,6942):

function zeros($rowCount, $colCount){
    $matrix = array();
             


        
3条回答
  •  鱼传尺愫
    2020-12-28 20:01

    You should try increasing the amount of memory available to PHP:

    ini_set('memory_limit', '32M');
    

    in your PHP file.

提交回复
热议问题