PDO fetchAll array to one dimensional

前端 未结 3 1282
忘掉有多难
忘掉有多难 2020-11-29 03:57

this may be a simple question but am struggling to understand how to solve it. I have a form which allows the user to select either \"custom\" or \"all\" staff\" to assign t

3条回答
  •  北海茫月
    2020-11-29 04:14

    You need to give fetchAll a fetch style

    $staff = $select->fetchAll(PDO::FETCH_NUM);
    

    From this link

提交回复
热议问题