[eluser]bEz[/eluser]
I believe $countries is assigned by reference and not it's own copy of the "country->all" object. (Phil, feel free to correct me on this)
Try the below changes:
Code:
$inventory = new inventory;
$country = new country;
$country->get();
// ============================
// Comment out this line and place below
// $countries = $country->all;
// ============================
echo "Total: " . $country->count();
// ============================
// re-get() the data and then apply the "all" method.
$country->get();
$countries = $country->all;
// ============================
IF all you want is a count, then the "extension" version is overkill.
IF you wanted the array, but wanted the count as well, then the extension method is the better choice.
IF you are trying to test "PHP" vs "PHP via CI" then I think you maybe fighting a useless battle.