Skip to main content
added 3 characters in body; edited title
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

PHP Multidimentional array initialization

I am initializing a phpPHP array as follows

$newArray = array();
$newArray['2014-13-03']['SMD']['IMPR'] = 5;
$newArray['2014-13-03']['SMD']['CLICK'] = 10;

JustI just wanted to check if you guys think this is a wrong way to insert data into an array. It is working just fine, but I still wanted to check from an optimization standpoint.

PHP Multidimentional array initialization

I am initializing a php array as follows

$newArray = array();
$newArray['2014-13-03']['SMD']['IMPR'] = 5;
$newArray['2014-13-03']['SMD']['CLICK'] = 10;

Just wanted to check if you guys think this is a wrong way to insert data into an array. It is working just fine, but still wanted to check from optimization standpoint

Multidimentional array initialization

I am initializing a PHP array as follows

$newArray = array();
$newArray['2014-13-03']['SMD']['IMPR'] = 5;
$newArray['2014-13-03']['SMD']['CLICK'] = 10;

I just wanted to check if you think this is a wrong way to insert data into an array. It is working just fine, but I still wanted to check from an optimization standpoint.

changed example
Source Link

I am initializing a php array as follows

$newArray = array();
$newArray['2014-13-03']['SMD']['ID']03']['SMD']['IMPR'] = 5;
$newArray['2014-13-03']['SMD']['ID']03']['SMD']['CLICK'] = 10;

Just wanted to check if you guys think this is a wrong way to insert data into an array. It is working just fine, but still wanted to check from optimization standpoint

I am initializing a php array as follows

$newArray = array();
$newArray['2014-13-03']['SMD']['ID'] = 5;
$newArray['2014-13-03']['SMD']['ID'] = 10;

Just wanted to check if you guys think this is a wrong way to insert data into an array. It is working just fine, but still wanted to check from optimization standpoint

I am initializing a php array as follows

$newArray = array();
$newArray['2014-13-03']['SMD']['IMPR'] = 5;
$newArray['2014-13-03']['SMD']['CLICK'] = 10;

Just wanted to check if you guys think this is a wrong way to insert data into an array. It is working just fine, but still wanted to check from optimization standpoint

Source Link

PHP Multidimentional array initialization

I am initializing a php array as follows

$newArray = array();
$newArray['2014-13-03']['SMD']['ID'] = 5;
$newArray['2014-13-03']['SMD']['ID'] = 10;

Just wanted to check if you guys think this is a wrong way to insert data into an array. It is working just fine, but still wanted to check from optimization standpoint