Is it possible to concatenate an if statement inside echo in php? How can I attach some condition based html to an html inside an echo? Something like as follow:
<?php
echo '<div class="main">Some html</div>' . if (is_page('my-account')) {
echo '<div class="account_data">Some account related data</div>';
}; . ;
?>
Aucun commentaire:
Enregistrer un commentaire