Answers for "rand in codeigniter"

PHP
0

rand in codeigniter

$this->db->select('name');
$query = $this->db->get('table');
$shuffled_query = $query->result_array();
shuffle ($shuffled_query);

foreach ($shuffled_query as $row) {
    echo $row['name'] . '<br />';
}
Posted by: Guest on August-23-2021

Browse Popular Code Answers by Language