Passing and returnging array to the functions
<p>I have created two arrays. I wanna pass these two array to any function. I am beginner with function so tried with rough code to achieve my task. As I have some values in $cntctnum and $cntcttype named array.</p>

<pre><code> $cntctnum      = array();
 $cntcttype     = array();
 $response = array();

 function play_with_array($cntctnum, $cntcttype){
 $contactnumber= $cntctnum[];
 $cntcttype = $cntcttype[];

 // some code to play with array.

 return resultarray();
 }


 $response = play_with_array($cntctnum, $cntcttype);
</code></pre>

<p>Is this right way to pass function in array?
Is I need to declare $response as array before or when I return resultarray(), it will automatically consider it as array?</p>
