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
精彩评论