Jump to content

[SOLVED] loop through function variables no matter the number of variables


lindm

Recommended Posts

Need help to create a function that does the below, but independent of the number of variables.

 

Basic function:

function test($field1,$field2) {if (($field1=="0"&&$field2=="0")||($field1==''&&$field2=='')) return 'all fields are null';} 

 

Should be something like:

function test($fields) {if (all fields =="0")||(all fields =="")) return 'all fields are null';} 

the function should work the same for row(field1,field2,field3) or row(field1,field2,field3,field4,field5,field6)

 

Possible?

 

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.