Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Wrap two HTML tags and render
  • but I did not find the two html tags render.
    For example, I wanna render the following raw html <a> and <i> tags using Fulephp Html::something. Is it possible?
    <a href="#"><i class="fa fa-gear fa-fw"></i> Settings</a>

    The following output will not include <i> tag result as I wanted but only <a> tag.
    <?php echo Html::anchor('#', 'Settings', array('class' => 'fa fa-gear fa-fw')) ?>
  • philipptempelphilipptempel
    Accepted Answer
    You could obviously go with
    <?php echo Html::anchor('#', '<i class="fa fa-gear fa-fw"></i>Settings') ?>
    or go with
    <?php echo Html::anchor('#',
    html_tag(
    'i',
    ['class' => 'fa fa-gear fa-fw'],
    ''
    )
    . 'Settings'
    ) ?>
  • Thank you very much Mr. Philipptempel. You saved my time. :)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion