Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从 MySQL 中提取数据并创建一个字符串,将字符串中的所有数据作为 1 个变量提取。
while($row = mysqli_fetch_array($res)) { $x= $row['SessionValue']; }
我知道这与我所追求的相距甚远,但如果提取的数据是:a、b、c、d(表示每个循环的逗号),我想要的输出将是:
$x='<li>a</li><li>b</li><li>c</li><li>d</li>'
我该怎么做?
只需将其链接到变量中
while($row = mysqli_fetch_array($res)) { $x= $x."<li>".$row['SessionValue']."</li>"; }