请看数据库的图片也我想显示我的复选框值从数据库。
Example : my value is 25,26.
So, How can i display it one by one ?
such as,
-- 1st value is : 25.
--2nd Value is : 26.
我的代码:
$db = new mysqli("localhost","paroshic_paroshic","kxmcwQzLTrTR","paroshic_matri2018jl");
$sql = "select * from tbldatingusermaster order by userid desc";
$result = $db->query($sql);
while($data = $result->fetch_object()){
echo $data->education; //My value is 25,26
}
谢谢。
2条答案
按热度按时间3pmvbmvn1#
你知道,你可以用echo把html标记写到页面上。所以基本上是这样的:
5fjcxozz2#
我想你要找的那块拼图可能是
explode
从给定字符串创建整数数组$data->educationid
(即:25,26)