Welcome Guest, Not a member yet? Register   Sign In
is this legal in a model?
#4

[eluser]xwero[/eluser]
So i have another view than Michael. In the view using an array as return you do
Code:
if(count($categories) == 0)
{
   // no data
}
else
{
  // output the data
}

One small error in Michaels code $categories->name needs to be changed to $categories[0]['name'] if you use your array. As far as i know you can't use the object syntax for arrays.


Messages In This Thread
is this legal in a model? - by El Forum - 12-05-2007, 07:16 AM
is this legal in a model? - by El Forum - 12-05-2007, 07:25 AM
is this legal in a model? - by El Forum - 12-05-2007, 07:29 AM
is this legal in a model? - by El Forum - 12-05-2007, 07:40 AM
is this legal in a model? - by El Forum - 12-05-2007, 07:40 AM
is this legal in a model? - by El Forum - 12-05-2007, 11:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB