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

Multiple Pages
Hi. Im very new to php. I'm trying to create a basic login/registration page.

So I have a bas

simple script won't work. Please help
I'm new to php, and I am having trouble displaying a simple script in my web browser. My php code ex

Time-based image rotation script
I'm trying to write a PHP script that rotates an image based on what time of day it is. I want the

Confused with Loop
guys, i got confused with Looping...this is the case

I have 3 stocks, let say "Stock A&q

True way to see if action was successful?
If this is a good way to see if action was successful to continue:

Code: function changeGa

ldap connection
We are using ldap to get user information from the domain controller. It was working before. Recentl

retrieving more than one max key from an array?
so i have an array of 20 numerical values (0-100) that i need to order from highest to lowest and th

Socket problem
Hello,

Earlier I posted about my problem with my socket script. It took up to 100% CPU usage.

Can't find the problem (no error message)!
OK, here's the deal. This code is really weirdly formatted (sorry!) and hard to understand, so I'm g

Where am I going wrong
Been trying to work this out for hours

I have two tables called 'Genres' and 'Films'. Genre

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