Re: Need to set default parameter || How to do in PHP?
| From: | peio popov | Date: | Sun, 02 Feb 2003 07:25:19 +0000 |
| Subject: | Re: Need to set default parameter || How to do in PHP? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133912@lists.php.net to get a copy of this message | ||
to set default vale for $id you may use something like :
$id = !empty($_GET["id"])?$_GET["id"]:null;
Cf High wrote:
Hey all. In cold fusion I was able to define a default value with the <cfparam name = "test" default = "myValue"> tag When I passed the variable "test" via a form or query string, it would over ride the parameter value. How can I do this in PHP? I looked in PHP manual for param, default, etc., but could find no equivalent. Any ideas? --Noah ---- --------------------------- Peio Popov - peio@cilaw.org icq# 117130734 http://www.cilaw.org