如何在锚标签中传递php变量? [英] how to pass a php variable in anchor tag?

查看:59
本文介绍了如何在锚标签中传递php变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<?php foreach ( $fields as $name => $value ):

        if ( $name == 'Venue' ):
        ?>


        <dt> <?php echo " <a href=''>" $name "</a>" ?> </dt>

        <dd class="tribe-meta-value"> <?php  $value ?> </dd>
        <?php endif ?>

         <?php endforeach ?>







变量$ fields包含两个变量$ name和$ value。

$ name是场地。

$ value是该地点的地址,即它是一个网址。并且由用户输入。

在输出屏幕上只显示场地名称,这将是一个超链接..点击时必须将用户重定向到场地页面。




variable $fields is contains two variables $name and $value.
$name is the venue.
$value is the address of that venue i.e. it is a web address. and is entered by the user.
on output screen only the name of the venue will be displayed which will be a hyperlink..which on click must redirect the user to the venue page.

推荐答案

fields as
fields as


name = >


value):

if(
value ): if (


这篇关于如何在锚标签中传递php变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆