CI syntax debugging

#7
[eluser]gRoberts[/eluser]
So it is, I didn't notice that.

I thought that item() was to return the value of the config array with the given key/index.

Are you sure you can provide `arModeSortType['books']` as an index, as I wouldn't expect item() to first get arModeSortType and then return the array at that key/index?

Code:
$types = $this->config->item('arModeSortType');
$current = $this->config->item('sCurrentMode');
echo "Types: <pre>";
print_r($types);
echo "</pre><br />Current:<pre>";
print_r($current);
echo "</pre><br />Current Data:<pre>";
print_r($types[$current]);
echo "</pre>";

What does the above code output?


Messages In This Thread
CI syntax debugging - by El Forum - 03-25-2008, 07:38 AM
CI syntax debugging - by El Forum - 03-25-2008, 07:41 AM
CI syntax debugging - by El Forum - 03-25-2008, 07:42 AM
CI syntax debugging - by El Forum - 03-25-2008, 09:04 AM
CI syntax debugging - by El Forum - 03-25-2008, 09:21 AM
CI syntax debugging - by El Forum - 03-25-2008, 09:37 AM
CI syntax debugging - by El Forum - 03-25-2008, 10:13 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.