How to concatenate html tag in php? [closed]

0
$t ='<span style=\"color:#FF0000;\"> ';
$t. "texto '</span>' ";
echo $t;

The above code does not work, nothing is printed. I believe the problem is at the closing of tag span .

How to solve?

    
asked by anonymous 05.12.2016 / 00:19

1 answer

1

There are some errors, but the basics would be:

$t ='<span style="color:#FF0000;"> ';
$t .= "texto </span> ";
echo $t;

Example - IDEONE

    
05.12.2016 / 00:23