Is there any way I can create 2 functions in Codeigniter controller where one of the function contains argument and the other doesn't. I am using the below code which is giving me an error.
class example extends CI_Controller {
function show() {
#code goes here
}
function show($id) {
#code goes here
}
}
But it's showing me an error that function name cannot be same.