Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 8th, 2005, 06:33 AM
Authorized User
 
Join Date: Jul 2004
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rajuru Send a message via Yahoo to rajuru
Default Self Created Function

I want to create a function like this

function myfunction($var1, $var2){
..........
..........
}

I know I can call this function by

echo myfunction(argument1,argument2);

am i right? If yes, now what I want is:

To use this function I have to pass 2 arguments; argument1 & argument2 as the function receives these agruments by $var1 & $var2 as parameter.
Now I want to use my function, user must have to provide 1st argument and the second argument is optional.

How I can make second argument optional for calling this function?

Thanks in advance

Best Regard:
Md. Zakir Hossain (Raju)
www.rubd.net
www.xenexbd.com
Cheap Hosting, Domain, Reseller
www.forum.rubd.net
__________________
Best Regard:
Md. Zakir Hossain (Raju)

www.rajuru.xenexbd.com - my blog with PHP scripts, PHP Book Review and many more





Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help me about dynamically created controls vingo_mail ASP.NET 2.0 Basics 1 March 24th, 2008 12:54 PM
New session gets created for every request. sasikanth Classic ASP Professional 0 September 26th, 2005 10:30 AM
Undected sessions being created scorpion_king General .NET 0 September 22nd, 2004 08:05 AM
New session created? patwadd Classic ASP Basics 3 August 26th, 2004 01:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.