Execute a PHP function as html attribute?

0

What I need is the following, I have this html code:

<div php-if="{{valor}}>0">CONTEUDO QUE SERÁ MOSTRADO DINAMICAMENTE</div>

The variable "{{value}}" already has how to return dynamically. What I would like now is to run a function in php that identifies that I am doing an IF comparison and if it returned false, that entire tag would be removed from the string. The result would be an html string, but without that example tag.

  •     
  • asked by anonymous 05.12.2017 / 03:15

    1 answer

    -1

    Aftermanyattempts,followthecodethatsolvedmyproblem.WithitIcanhideordisplayanhtmlelementusingaphp"IF" like html attr. Remembering that this variable "{{value}}" comes from my template via controller, so its value is dynamic.

        
    05.12.2017 / 04:53