Problem quotes |
[eluser]sparky2910[/eluser]
Code: echo '<a class="btn btn-info" href=".'site_url(">Info </a>'; Please why doesn't work it ?[/code]
[eluser]CroNiX[/eluser]
There's several things wrong with that, like you are missing a . for string concatenation and you only have 3 single quotes, which means a mismatch. Code: <a class="btn btn-info" href="<?php echo site_url('controller/method'); ?>">Info</a> or use the anchor() helper http://ellislab.com/codeigniter/user-gui...elper.html Code: $this->load->helper('url');
[eluser]jonez[/eluser]
Code: echo '<a class="btn btn-info" href="' . site_url( ) . '">Info </a>'; When you print to the screen you should use the output class: http://ellislab.com/codeigniter /user-guide/libraries/output.html
|
Welcome Guest, Not a member yet? Register Sign In |