Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 8th, 2005, 06:33 AM
Authorized User
Join Date: Jul 2004
Location: rajshahi, , Bangladesh.
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)
Cheap Hosting, Domain, Reseller
Best Regard:
Md. Zakir Hossain (Raju)

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 08:46 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.