Page 1 of 1

Multidimensional array search and compare, invalid argument!

Posted: Thu Oct 09, 2008 6:47 am
by leathem
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
<<<<<<<<<<<<<<<<<

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"])); 
  }
 

Re: Multidimensional array search and compare, invalid argument!

Posted: Thu Oct 09, 2008 9:59 am
by aceconcepts
It's far easier for people to read your code if you place it between the code brackets.

Re: Multidimensional array search and compare, invalid argument!

Posted: Thu Oct 09, 2008 10:50 am
by leathem
where exactly do u mean.

Re: Multidimensional array search and compare, invalid argument!

Posted: Thu Oct 09, 2008 10:54 am
by aceconcepts
When you reply to a post click the "code" button in the editor.

Re: Multidimensional array search and compare, invalid argument!

Posted: Thu Oct 09, 2008 11:04 am
by leathem
cheers kid. no can u solve the problem.

Re: Multidimensional array search and compare, invalid argument!

Posted: Fri Oct 10, 2008 4:00 am
by leathem
didn't think so.

Re: Multidimensional array search and compare, invalid argument!

Posted: Fri Oct 10, 2008 4:58 am
by aceconcepts
Easy dude - some of have work to do!!!

I come on this forum to help people out.