Hello, i was seeing if anyone could help me with a function i am having an issue writing.
I have to put the first three values into the array, sort it and return the value in the array given by the 4th parameter, and if the 4th parameter is 2 then return the 2nd value of the array.
My function is-
function sortArray($parameter1,$parameter2,$parameter3,$parameter4) {
//Function and array with four parameters
if ($parameter4 =2)
return result;
//returns result with parameter
rsort($sortArray);
I know this is not correct,I am not too familiar with arrays better yet PHP code at all.