我有以下代码从数据库中提取地址。
<td class="center"><?php echo ($customer->address!='')?$customer->address:'NA';?></td>
Run Code Online (Sandbox Code Playgroud)
并在管理区域上显示地址。
我希望使用以下方式将地址链接到Google地图
<a href="maps.google.com/?p= {then the addy} "> {the addy} </a>
Run Code Online (Sandbox Code Playgroud)
但是,当我将链接添加到代码中时,代码将中断。
最近的尝试是
<td class="center"><a href="http://map.google.com/?p=<?php echo ($customer->address!='')?$customer->address:'NA';?>"><?php echo ($customer->address!='')?$customer->address:'NA';?></a></td>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3062 次 |
| 最近记录: |