adzie Posted December 6, 2008 Share Posted December 6, 2008 Hello, Currently I have this <td><a href="<?=$_SERVER['php_SELF']?>?page=<?=$pageNum?>&group=<?=$group?>&order=name&list=<?=$list?>">name</a></td> but trying to put it into php i get the error echo '<td><a href="<?=$_SERVER['php_SELF']?>?page=<?=$pageNum?>&group=<?=$group?>&order=name&list=<?=$list?>">name</a></td>'; syntax error, unexpected T_STRING, expecting ',' or ';' Link to comment https://forums.phpfreaks.com/topic/135805-solved-syntax-error/ Share on other sites More sharing options...
Mark Baker Posted December 6, 2008 Share Posted December 6, 2008 Try using & rather than & <td><a href="<?=$_SERVER['php_SELF']?>?page=<?=$pageNum?>&group=<?=$group?>&order=name&list=<?=$list?>">name</a></td> Link to comment https://forums.phpfreaks.com/topic/135805-solved-syntax-error/#findComment-707743 Share on other sites More sharing options...
gevans Posted December 6, 2008 Share Posted December 6, 2008 <?php echo '<td><a href="'.$_SERVER['php_SELF'].'?page='.$pageNum.'&group='.$group.'&order=name&list='.$list.'">name</a></td>'; ?> You're trying to open and close php tags inside the script also if you do use tags use the full ones; <?php not <? also i'd suggest; <?php echo not <?= Link to comment https://forums.phpfreaks.com/topic/135805-solved-syntax-error/#findComment-707745 Share on other sites More sharing options...
adzie Posted December 6, 2008 Author Share Posted December 6, 2008 thanks chaps Link to comment https://forums.phpfreaks.com/topic/135805-solved-syntax-error/#findComment-707775 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.