[eluser]benyu[/eluser]
e.g
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
$the_array = array();
$the_array[] = "some value ...";
//more..
// save as test_helper.php in application/helper directory.
function test()
{
global $the_array;
//always getting the " Invalid argument supplied for foreach()" error
foreach($the_array as $key=>$value)
{//....}
}
//because here used the array as well!
function another_function(){}
?>