example:
Code: Select all
public function myfunction(){
$myarray = array(.....);
$a = array();
$b = array();
foreach($myarray as $array)
{
$a[] = $array[0];
$b[] = $array[1];
}
}
I appreciate any help or direction. Thanks!
Moderators: ooffick, General Support Moderators
Post by mrscooper » Tue Feb 04, 2014 10:25 pm
Code: Select all
public function myfunction(){
$myarray = array(.....);
$a = array();
$b = array();
foreach($myarray as $array)
{
$a[] = $array[0];
$b[] = $array[1];
}
}
Post by H13 » Tue Feb 04, 2014 11:27 pm
Code: Select all
$returnValue = array();
$i = 0;
foreach($myarray as $array)
{
$returnValue['a'][$i] = $array[0];
$returnValue['b'][$i] = $array[1];
$i++;
}
return $returnValue;
Post by mrscooper » Tue Feb 04, 2014 11:49 pm
Post by H13 » Wed Feb 05, 2014 2:12 pm
Post by mrscooper » Wed Feb 05, 2014 3:30 pm
Post by H13 » Wed Feb 05, 2014 4:22 pm
Return to “Joomla! 3.x Coding”
© 2005 - 2024 Open Source Matters, Inc. All Rights Reserved.