I need to print contents of multiple arrays in my code. Eg
function performOp($n, $inputArr, $workArr) { printf("Entered function, value of n is %d", $n); print_r($inputArr); print_r($workArr); $width =0; }
Now, Instead of writing print_r twice, is there any way I can write a single statement and print both the arrays ? Also, If I want to print "Input array value is " before displaying the Array{}, is there a way to do so using printf or any other function?
I tried writing
printf("Value of inputArray is %s ", print_r($inputArr), but this would not work.
Any help is really appreciated.
Thanks