Jump to content

Making a parameter in a function optional


YourNameHere

Recommended Posts

How would a make a function that "CAN" take 4 params but make 2 optional. In some of the language construct functions I see it is possible.  but I get an error when I do it with a homemade  function.

 

for example: mysql_error();  will take two params but you can omit the $link identifier.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.