怎么让<=$row["id"] ?>输出一个数值

WBOY
Release: 2016-06-13 11:29:01
Original
787 people have browsed it

怎样让=$row["id"] ?>输出一个数值啊
我想把以前写的ASP程序转换成PHP程序,结果遇到一个*烦。就是:
ASP中


  

">
    )">编辑
 
  loop %>

则每个tr的id属性值分别为 fff1,fff2,fff3等

但改成PHP程序

    while($row=$result->fetch_assoc()){      ?> 

  ">
     )">编辑
 
   } ?>
则每个tr的id属性值都是 fff,fff,fff等,

我于是怀疑$row["id"] 的数据类型不是数值型,遂用$id=intval($row["id"])+0;去将其强制转换成数值型,但转换后结果为0啊
每个tr的id属性值都是 fff0,fff0,fff0等,

请问要怎么样使PHP中
每个tr的id属性值分别为 fff1,fff2,fff3等



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template