[eluser]Gram3000[/eluser]
Hello,
I use the uri->segment() method a lot to pass variables to functions, for example:
Code:
$product_id = $this->uri->segment(3, 0);
Is the approach mentioned in the Codeigniter Controller documentation recommended instead using uri->segment()? Is it a safer or more optimized away to pass variables?
The example given in the documentation is :
Code:
<?php
class Products extends CI_Controller {
public function shoes($sandals, $id)
{
echo $sandals;
echo $id;
}
}
?>