dongsunny1113 2013-03-18 15:00
浏览 12
已采纳

php-form-b​​uilder-class复选框值

I am using the php-form-builder-class and am trying to pass in an array to the values to mark the box as checked however the array doesn't work if there are keys. Is there anyway to remove or return the array as

array("0", "1", "2", "3")

instead of

Array ( [0] => "0" [1] => "1" [2] => "2" [3] => "3") 

Thanks in advance for your help.

  • 写回答

1条回答 默认 最新

  • dongyan6235 2013-03-18 15:02
    关注

    The array you are dumping is equivalent to the first array (that is there are always "keys" in PHP even though they are ordered integers by default). Maybe you can try using array_values($array)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 有人能看一下我宿舍管理系统的报修功能该怎么改啊?链表那里总是越界
  • ¥15 cs loadimage运行不了,easyx也下了,没有用
  • ¥15 r包runway详细安装教程
  • ¥15 Html中读取Json文件中数据并制作表格
  • ¥15 谁有RH342练习环境
  • ¥15 STM32F407 DMA中断问题
  • ¥15 uniapp连接阿里云无法发布消息和订阅
  • ¥25 麦当劳点餐系统代码纠错
  • ¥15 轮班监督委员会问题。
  • ¥20 关于变压器的具体案例分析