0
我正在学习PHP,并且介绍了目标网站,目标网站是人们可以发布其商品进行销售的网站。我已经成功地创建了一个用于将数据从用户插入到我的数据库的表单,并且还从数据库中提取了数据供用户查看。现在我的问题是如何使任何用户发布的每个项目的标题具有唯一的URL。另外我想要这样一种方式,每个标题点击时都会让观看者看到特定项目的更多细节。我该如何将纯文本转换为独特的网址
下面是数据回声到我的网页代码:
<?php foreach ($itemarray as $itemarrays): ?>
<div style="width:200px; float: left; height: 100px;">
<div style="background:#999; border-radius: 10px; text-align:center; float: left; width:100px; float:left; ">
<?php echo htmlspecialchars($itemarrays['date'], ENT_QUOTES,
'UTF-8'); ?></div>
<div style="background:#063; width: 100px; float:left; height: 100px;">Image</div>
</div>
<div style="background:#F6F; float: left; width: 500px; height: 100px;">
<?php
echo $itemarrays['title']; ?>
<div style="background: #9FF; float: left; width: 100%;">
<?php
echo $itemarrays['description']; ?>
</div>
</div>
<div style="background: #9F3; float: right; width: 125px; height: 100px;">
<?php
echo $itemarrays['location']; ?></div>
<?php endforeach; ?>
</div>
</div>.
请有关如何通过此厄运任何帮助吗?