I have loaded SQL data into a bunch of arrays. I would like to use those array to create one big multidimensional array.
for ($h=0; $h<=count($siteName); $h++){
for ($x=0; $x<=count($pluginNames); $x++)
{
for ($y=0; $y<=count($wpvData); $y++)
{
$plugData = array($siteName[$h]=>array($pluginNames=>array($pluginNames[$x],$vData[$y],$wpvData[$y],$row[$y])));
}
}
}
The error I get is:
Notice: Undefined offset: 0 in /Applications/MAMP/htdocs/BJANSDJNAS.php on line 124
Warning: Illegal offset type in /Applications/MAMP/htdocs/BJANSDJNAS.php on line 124
Line 124 = $plugData array line.
Is this even possible?
Is there a better way to do this all together?
My goal is to store a bunch of data related to a website in a multidimensional array so I can display it in html divs. Basically I have a wordpress site and I would like to manage the plugins with a nice GUI via html.
array($pluginNames=>array(...))?$pluginNamesis an array, how can it be the key in an associative array?foreachinstead offor.