Re: php suggestion

From: Date: Mon, 14 Feb 2005 09:20:01 +0000
Subject: Re: php suggestion
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-14916@lists.php.net to get a copy of this message
Quoting Ante Drnasin <ante.dfg@moj.net>: > ex1: > function AddToDb(mysql_scape_string($text)) { > //enter $text to db > } > which would be the same as > function AddToDb($text) { > $text = mysql_escape_string($text); > //enter $text to db > } > > ex2: > > function removeDigitsFromText($text) { > //return the text striped from digits > } > > function AddTextToDB(removeDigitsFromText($text)) { > //add text to db; > } > > This could be very usefull although I do understand that it could cause > problems (references for example) .... Why could this be usefull? You're putting logic into the parameter list, I can't think of a reason why you would like to do this. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.

« previous php.internals (#14916) next »