Answer the question
In order to leave comments, you need to log in
How to push a model object to an array of similar models in Yi?
Hello,
This is the situation.
There is:
// array of objects $model = Product::model()->findAll();
AND
// object
Tried like this:
But with foreach I got an error: Fatal error: Call to a member function children() on a non-object in X:\home\tasty\www\protected\views\product \all.php on line
44 assigned the element somehow incorrectly. Help advice! $other_model = Product::model()->findByPk(5);
$model[] = $other_model;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question