Is it possible to use PHP within a data-title
field?
I have the following code:
<div id="grid" class="m-row shuffle--container shuffle--fluid">
<?
$result = $connection -> query("SELECT * FROM portfolio") or die($connection -> error);
while($row = $result -> fetch_array(MYSQLI_ASSOC)){
?>
<div class="col-md-3 col-sm-4 col-xs-12 m-col-md-3 picture-item"
data-groups='["<?=$row['portfolio_tipo']?>"]'
data-date-created="<?=$row['portfolio_data']?>"
data-title="<?=$row['portfolio_titulo']?>">
<div class="picture-item__inner">
The problem is that every data-...
field does not work with php inside. None of the attributes works.
This code in html was working perfectly, after putting it with php crashed.