T_VARIABLE error
-
Hello! I’m trying to make a test in a post, but I get the message:
“PHP Parse error: syntax error, unexpected T_VARIABLE in E:\home\barreirainformatica\Web\novo\wp-content\plugins\insert-php\insert_php.php(48) : eval()’d code on line 11”
Did I type something wrong? I’m not yet used to PHP anyway.
This is what I’m trying to do:[insert_php] $time = date("H"); if( $time >= 17 && $time < 19 ) $img_name = 'http://www.bistec.com.br/novo/wp-content/uploads/2014/11/Sweda-Apas-g-2010-shop_166110151912930.jpg'; else( $time >= 19 && $time < 6 ) $img_name = 'http://www.bistec.com.br/novo/wp-content/uploads/2014/11/padarias560.jpg'; [/insert_php] <style> .my-class{background-image:url('[insert_php] echo $img_name; [/insert_php]');} </style> <div class="my-class">Aproveite que o S@T Sweda - Soluções em Automação Comercial foi homologado e assista a palestra do 3º Fórum BISTEC sobre o produto.</div>THanks in advance.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘T_VARIABLE error’ is closed to new replies.