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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -