note 78028 added to functions.returning-values

From: Date: Mon, 24 Sep 2007 22:57:00 +0000
Subject: note 78028 added to functions.returning-values
Groups: php.notes 
Request: Send a blank email to php-notes+get-130756@lists.php.net to get a copy of this message
mmamedov ::> pub [at] turkmenweb d0t c0m im not sure if what you are doing is right...try this: <?php function isValid($vartocheck) { if($vartocheck == true) { return 1; } else { return 0; } } ?> Then in your code: <?php $var = isValid($var1=$var2) if($var == 0) { // Show Error } else if($var == 1) { // Show success } ?> ---- Server IP: 87.124.64.96 Probable Submitter: 86.20.187.216 ---- Manual Page -- http://www.php.net/manual/en/functions.returning-values.php Edit -- https://master.php.net/note/edit/78028 Del: integrated -- https://master.php.net/note/delete/78028/integrated Del: useless -- https://master.php.net/note/delete/78028/useless Del: bad code -- https://master.php.net/note/delete/78028/bad+code Del: spam -- https://master.php.net/note/delete/78028/spam Del: non-english -- https://master.php.net/note/delete/78028/non-english Del: in docs -- https://master.php.net/note/delete/78028/in+docs Del: other reasons-- https://master.php.net/note/delete/78028 Reject -- https://master.php.net/note/reject/78028 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#130756) next »