CodeIgniter Forums
Check if there is get parameters - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Check if there is get parameters (/showthread.php?tid=48269)



Check if there is get parameters - El Forum - 01-10-2012

[eluser]Unknown[/eluser]
Hello.
I wonder how I can check if the number of get params is more than 0? I tried just
Code:
count($this->input->get());
but if there is not any get params the $this->input->get() becomes boolean "true". And this is quite strange for me. When there is some params it becomes an array. So now I use
Code:
if (is_array($this->input->get())
to check if there is any params, but it seems not the best solution