How would I go about writing a function in php with an unknown number of parameters, for example
function echoData (parameter1, parameter2,) { //do somet
use func_get_args() to retrieve an array of all parameters like that:
$args = func_get_args();
You can then use the array or iterate over it, whatever suits your use-case best.