VERY basic function question

From: Date: Thu, 17 Mar 2005 08:24:31 +0000
Subject: VERY basic function question
Groups: php.general 
Request: Send a blank email to php-general+get-210944@lists.php.net to get a copy of this message
I'm trying to learn functions (just started). I can't see why this fails: <?php function count($var) { if ($var == 10){ $result = $var + 10; return $result; } else { $result = $var + 20; return $result; } } $setvar = 10; count($setvar); echo "$result"; ?> I probably just didn't understand my manual. Any ideas? Thanks -Will

« previous php.general (#210944) next »