Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/258.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在php标签中包含fa图标?_Php_Icons_Font Awesome - Fatal编程技术网

在php标签中包含fa图标?

在php标签中包含fa图标?,php,icons,font-awesome,Php,Icons,Font Awesome,我试图在php标记中包含字体很棒的图标,但我是php新手,不知道如何正确地做到这一点 我有 <?php echo $this->orderByList['orderby']; ?><i class="fa fa-arrow-circle-o-down"></i> 我想在php标记中包含iclass,这可能吗?如果是,请有人给我举个例子 谢谢:)有很多方法。。举几个例子: echo sprintf('<i class="fa fa-arrow-

我试图在php标记中包含字体很棒的图标,但我是php新手,不知道如何正确地做到这一点

我有

<?php echo $this->orderByList['orderby']; ?><i class="fa fa-arrow-circle-o-down"></i>

我想在php标记中包含iclass,这可能吗?如果是,请有人给我举个例子


谢谢:)

有很多方法。。举几个例子:

echo sprintf('<i class="fa fa-arrow-circle-o-down %s"></i>', $this->orderByList['orderby'];

echo '<i class="fa fa-arrow-circle-o-down '.$this->orderByList['orderby'].'"></i>';
echo sprintf(“”,$this->orderByList['orderby'];
回声';

有很多方法..举几个例子:

echo sprintf('<i class="fa fa-arrow-circle-o-down %s"></i>', $this->orderByList['orderby'];

echo '<i class="fa fa-arrow-circle-o-down '.$this->orderByList['orderby'].'"></i>';
echo sprintf(“”,$this->orderByList['orderby'];
回声';

在PHP中以串联字符串的形式输出HTML

<?php echo $this->orderByList['orderby'] . '<i class="fa fa-arrow-circle-o-down"></i>'; ?>

在PHP中以串联字符串的形式输出HTML

<?php echo $this->orderByList['orderby'] . '<i class="fa fa-arrow-circle-o-down"></i>'; ?>


您需要将此代码放在PHP文件中,并在页面标题中链接font Aweasome css文件。您需要将此代码放在PHP文件中,并在页面标题中链接font Aweasome css文件。谢谢,尽管“orderby”的输出是一个链接,但启动图标不是页面的一部分,但我还是有点小问题链接。但是我认为这需要另一个问题。再次感谢您的帮助,非常感谢。虽然我有一个小问题,从“orderby”的输出是链接,但引导图标不是链接的一部分。但是我认为这需要是另一个问题。再次感谢您的帮助,非常感谢