Welcome Guest, Not a member yet? Register   Sign In
Deep level argumenting
#2

[eluser]Lotus[/eluser]
remap has a second parameter $params which is an array of the other parameters passed in. So...
Code:
function _remap($main_category, $params = array())
{  
  // do stuff with main category...

  while ($subcategory =  array_pop($params))
  {
    // do stuff with each sub category
    // each iteration of loop is another level deeper of sub categories
  }
}


Messages In This Thread
Deep level argumenting - by El Forum - 08-11-2012, 12:44 PM
Deep level argumenting - by El Forum - 08-11-2012, 01:02 PM
Deep level argumenting - by El Forum - 08-11-2012, 01:06 PM
Deep level argumenting - by El Forum - 08-11-2012, 04:42 PM
Deep level argumenting - by El Forum - 08-12-2012, 10:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB