I honestly feel that there is minimal difference. I personally use the html anchor because it uses more html.
If you want to add the context path inside the view, simply do the following:
<a href="<?=site_url('path/name');?>">anchor</a>
However, one of the advantages of using codeigniter bindings is that if you want to dynamically create content:
for($i = 0; $i < $count; $i++) {
$anchors[] = anchor('path/name', 'anchor');
}
easier than
for($i = 0; $i < $count; $i++) {
$anchors[] = '<a href="'.site_url('path/name').'">anchor</a>';
}
Do you see the difference? :)
source
share