Reply to Re: arguments from function

Your name:

Reply:


Posted by Erwin Moller on 09/15/06 11:42

iulian.ilea wrote:

> Hey,
>
> I try to explain what is "arguments from function" :)
>
> So... if I have a function (i.e. function me($param1, $param2)). It is
> possible to call me($param1)? Like in JavaScript.

Hi

I am not 100% sure I understand what you want, but this may be relevant:

You can use defaultvalues in the function like this:

function testFunc($arg1,$arg2='test',$arg3=false){
...
}

If you call testFunc like this:

testFunct(23,'Joe');

In testFunct the following values are used:
$arg1 <- 23 (passed by calling of the function)
$arg2 <- 'Joe' (passed by calling of the function)
$arg3 <- false. Defaults to the value you defined in the function.

Does that help?

Regards,
Erwin Moller

[Back to original 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

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