Answer the question
In order to leave comments, you need to log in
How to display the value of an array in random order from json_decode?
I have a model where, when displayed on a page, it decodes a string into an array
public function afterFind()
{
$this->answear = json_decode($this->answear, true);
}
shuffle($model[0]->answear);
var_dump($model[0]->answear);
Answer the question
In order to leave comments, you need to log in
But in the record it does not work for me to mix it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question