Welcome Guest, Not a member yet? Register   Sign In
scopes within a view
#2

[eluser]xwero[/eluser]
A function is a stand alone entity it has nothing to do with the view file. If you do
Code:
function echoConfigItem(){
$IC=& get_instance();
$item = $CI->config->item('some_array_key');
echo $item;

}
You will get the desired result.

As a side note it's better not to add functions to your view files. They should be display only.


Messages In This Thread
scopes within a view - by El Forum - 09-04-2008, 01:09 AM
scopes within a view - by El Forum - 09-04-2008, 01:28 AM
scopes within a view - by El Forum - 09-04-2008, 01:34 AM
scopes within a view - by El Forum - 09-04-2008, 11:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB