html in php variable code example
Example 1: use php variable in html attributes
<span title="<?php echo htmlspecialchars($variable); ?>">
Example 2: how to make a variable in php
$varName = "Hello, World";
<span title="<?php echo htmlspecialchars($variable); ?>">
$varName = "Hello, World";