I want to create a variable argument function, which will insert a new row into a table. The function will contain table name,attribute,its value.Since no of attributes in a table is variable, variable number of arguments should be provided.Can you suggest an idea?
func_get_args
is probably what you are looking for.
func_num_args
in combination with func_get_args
will return the amount of arguments supplied to a function and their values. Although from what it sounds like, you should accept your attributes and values using arrays.