Jump to content

Argument-Dynamic Function


mostafatalebi

Recommended Posts

Hello

 

How I can write functions in PHP which could have any number of arguments, and not a limited number, or a fixed/predefined number.

for instance:

 

function doCheck ($name, $lastname)

{

 

}

// the above function has two arguments and therefore is not dynamic. I want a function without any predefined number of argument and yet be able to receive variety of arguments (of course based on its functionality.)

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/272778-argument-dynamic-function/
Share on other sites

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.