Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/256.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 我已经准备好面对这个问题了_Php_Html_Arrays - Fatal编程技术网

Php 我已经准备好面对这个问题了

Php 我已经准备好面对这个问题了,php,html,arrays,Php,Html,Arrays,我在这段代码中遇到了这个问题。我已经写了代码,还附上了截图,你必须在查看截图后清除更多。当您必须查看屏幕截图时,请查看更新查询和显示序列值是错误的 但我认为序列值显示的是勾选的复选框 这是序列数组: Array ( [0] => 09 [1] => 45 [2] => 76 ) Array ( [0] => 1 [1] => 3 ) 这是复选框值: Array ( [0] => 09 [1] =>

我在这段代码中遇到了这个问题。我已经写了代码,还附上了截图,你必须在查看截图后清除更多。当您必须查看屏幕截图时,请查看更新查询和显示序列值是错误的

但我认为序列值显示的是勾选的复选框

这是序列数组:

Array
(
    [0] => 09
    [1] => 45
    [2] => 76
)
Array
(
    [0] => 1
    [1] => 3
)
这是复选框值:

Array
(
    [0] => 09
    [1] => 45
    [2] => 76
)
Array
(
    [0] => 1
    [1] => 3
)
更新查询复选框时,值显示正确,但序列值显示错误

     <table id="contentTable"> 

    													  <tr> 
                                                            <td  id="formCreateLabel">
                                                            <label for="learnTabname"><strong>Show on Home page</strong></label></td>
                                                            <td id="formCreateLabel" style="float: left"><strong>Testimonial Name</strong></td>
                                                            <td><strong>Sequence</strong></td>
                                                          </tr>

    <?php	for ($counter=1; $counter<=4; $counter++) {?>
    <tr>
                                                              <td  align="center" ><input type="checkbox" name="t1[]" value="<?php echo $counter;?>" id="t1[]" <?php if($row_getThisRecord['isFeatured']==1){ ?>  checked="checked"<?php } ?> /></td>
                                                              <td  style="float: left;margin-left:44px;"><?php echo "TEST a".$counter?></td>
                                                              <td><input type="text" style="width:30px" name="isSeq[]" value="0" id="isSeq[]"  /></td>
                                                            </tr>
             <?php }?>                                             

               </table>


在主页上显示
推荐名称
序列

根据需要使用以下功能之一:-

sort() - sort arrays in ascending order
rsort() - sort arrays in descending order
asort() - sort associative arrays in ascending order, according to the value
ksort() - sort associative arrays in ascending order, according to the key
arsort() - sort associative arrays in descending order, according to the value
krsort() - sort associative arrays in descending order, according to the key
请参考此示例