Reputation: 11
I am having a trouble using Glyphicons in PHP. Here is the error:
Parse error: syntax error, unexpected ''glyphicon-ok'' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';'
<i class="glyphicon
<?php
echo $output 'glyphicon-ok';?> "></i>
Upvotes: 0
Views: 850
Reputation: 18600
You are missing concatenation operator .(dot)
after echo $output
.
<i class="glyphicon <?php echo $output.'glyphicon-ok';?> "></i>
^^^^
OR might be you want this
<i class="glyphicon glyphicon-ok"></i><?php echo $output;?>
Upvotes: 0
Reputation: 2763
So far I can only guess, but probably you wanted something like this:
<span class="glyphicon glyphicon-ok"></span> <?= $output ?>
If doesn't work due to <?=
tag, change then to <?php echo $output ?>
Upvotes: 1