Multidimensional array search and compare, invalid argument!
Posted: Thu Oct 09, 2008 6:47 am
hello all,
i have a multi dimensional array that is pulled from a config file, i want to loop through each element of the array and acompare it to another element of a xml file if it matches it displays the result. the problem is it doesn't work. it has sumthin to do with the indicated line ****
here is the code.
config.properties file
<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<
index.php
<<<<<<<<<<<<<
i have a multi dimensional array that is pulled from a config file, i want to loop through each element of the array and acompare it to another element of a xml file if it matches it displays the result. the problem is it doesn't work. it has sumthin to do with the indicated line ****
here is the code.
config.properties file
<<<<<<<<<<<<<<<<<
Code: Select all
groups = group1 group2
group1.projects = bla bla1 bla2
group2.projects = fla1 fla2
index.php
<<<<<<<<<<<<<
Code: Select all
function summaryDisplay($dir_name, $filter, $rss)
{
global $config;
$groups = ($config["groups"]);
$groupsArray = explode(' ', $groups);
$projectsArrays = array();
for($i = 0; $i < count($groupsArray); $i++)
{
**** $projectsArrays[$i] = explode(' ', ($config[$groupsArray[$i] + ".projects"]));
}