![]() |
view params alternative value if not set - 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: view params alternative value if not set (/showthread.php?tid=32441) |
view params alternative value if not set - El Forum - 07-23-2010 [eluser]helle[/eluser] Hi, is there a way to do something like this in that notation? {param|"hallo world"} which means if param is not set, hello world will be displayed in the view instead. view params alternative value if not set - El Forum - 07-23-2010 [eluser]danmontgomery[/eluser] if you're using form_validation, you can use set_value(). If not: Code: echo (isset($param) ? $param : 'hello world'); |