开发者

codeigniter anchor set a ID

how can i put a ID on this

<?php echo anchor('profil', 'Profil'); ?>

i wanna echo a username ID to it like

<a href="pro开发者_运维百科fil.php?id=<?php echo $id; ?>">Profile</a>


echo anchor('profil.php?id='.$id, 'My News');

but you'd better use the CodeIgniter router and place the id as parameter, e.g:

echo anchor('profil/'.$id, 'My News');

this will output a link like:

http://www.site.com/profil/233
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜