📜  rand in codeigniter - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:22.225000             🧑  作者: Mango

代码示例1
$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'] . '
'; }