I'm trying to write a function in a CodeIgniter controller which can take optional parameters. However, I always get Missing Argument warnings. I'm not trying to suppress the warnings - I'm trying to declare the parameters as optional (maybe they could be empty strings if they don't exist, or something).
What is it I'm missing?
Thanks
Mala
public function my_optional_test($not_optional_param, $optional_param = NULL)
{ $this->stuff(); }
have you tried this?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With