You are here: RE: [PHP] VERY basic function question « PHP « IT news, forums, messages
RE: [PHP] VERY basic function question

Posted by YaronKh on 03/17/05 10:59

Hi

Don’t call you function count

-----Original Message-----
From: William Stokes [mailto:kalles@operamail.com]
Sent: Thursday, March 17, 2005 10:25 AM
To: php-general@lists.php.net
Subject: [PHP] VERY basic function question

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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация