an interesting question


Posted on 16th Feb 2014 07:03 pm by admin

Greetings folks, got to ask an interesting question...

let say
i have created a function something like
Did you know?Explore Trending and Topic pages for more stories like this.

function xxx($a=4, $b, $c=4) {


}


now, is there any way to call this function so that i only send the required parameter (ie; $b) while bypassing the other two parameters ($a , $c), ie; to let them use their default values.

i tried,
xxx( , 55, );

ie; i bypassed the params that i want to use their default values, but i can't do this way, php gives some error. Is there any other way?? any idea?
No comments posted yet

Your Answer:

Login to answer
290 Like 43 Dislike
Previous forums Next forums
Other forums

Text Not Displaying Correctly With PHP:GD
I recently moved servers and since then I have noticed that one line of text is showing weirdly.

Where do I put CRON code
So I've figured out alot about how to automatically run a php function. I can't figure out where to

Time script, set to my time zone?
I am using this line to get the date and time

Code: $time = date(F." ".d.", &q

same querie, or a new one??
Hi guys,

I'm still working on this drop down list. I've got the actual drop down list to wor

How to Handle more than one submit button in single form?
Hi
I have one PHP file which contains one Form. In this form there are two Submit type Buttons

dropdown box help - open php files to textarea
Hi, I am using tinymce to edit content located in several php files. The code I attached works but i

Stuck with preg_replace
Hi,

I'm trying to use preg_replace to remove part of the IP address submitted using a form on

session checking in page load
hai all I have a web site is www.Mryas.com in this my login page is Page1.aspx its co

Downloading file (Headers)
I'm trying to make users download a file, but they must wait 60 seconds before it begins.

But

Implementing Single Sign-On using SAML 1.1, x.509, LDAP in C#.net
Hi, I got a requirement from the client i.e implementing single sing on using SAML 1.1( LDAP &

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash