php quotation mark is not working -
i facing problem in php code. basic question don't know answer. code here:
echo '<a href="profile.php?act=show&id=<?=$_session['id']?>&line=true" class="myac">my data</a>';
how use quotation mark in id
? please me.
that's wrong. using echo
. concatenate value way:
<?php echo '<a href="profile.php?act=show&id=' . $_session['id'] . '&line=true" class="myac">my data</a>'; //-------------------------------------^^^^^^^^^^
and please refrain using short tags (<? ?>
), use full tags: <?php ?>
.
Comments
Post a Comment