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

mysql_real_escape_string
Let me preface this that I am very much a PHP noob, but I have some SQL training (not necessarily My

Problems with array
This code is the last lines in an upload script that uploads 4 images at the same time and writes th

Echo Tweaking help!
HI. I would like to have the output of the entered variables repeat forever, but it's stopping at th

Applet JTextField Size Problem
Hello,

I recently started making an applet to calculate certain values for airplanes. However

Check Date/Time in PHP
What I need the code to check is that $reQuest is 24 hours in the past then return a time based on h

Error Messaging not working
I changed the way my form tells the user of an error. But I can't seem to get it to work properly.

Converting from one format to another
"I have got a date in DD/MM/YYYY but I need it in MM-DD-YYYY. Help!"

How would I convert this into code using an if statement?
ES equals exam score m equals $mean s equals $total. I already coded my mean and total so I'm not g

Passing vars to the DB
I have 3 small testing tables:

ID TYPE
1 pepperoni
2 C. bacon
3 taco

ID TY

problem in program for counting no of chars using pointers
Hi all, I was trying to make a program which counts number of chars in a string using concpt of poin

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