We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Set value of \Phalcon\Tag::tagHtml

So, using \Phalcon\Tag::tagHtml('li', ['class'=>'breadcrumb-item'], true, true) I get an empty html li tag. How do I set its content?



43.9k

Hi,

maybe (where third parameter, selfClose, of tagHtml is set to false):

<?php echo \Phalcon\Tag::tagHtml('li', ['class'=>'breadcrumb-item'], false, true, true); ?>

my content here

<?php echo Phalcon\Tag::tagHtmlClose("li", true); ?>



940

I was building an array of tags to build the output later so your solution doesn't actually help me