So, I have some variables being passed to a function, wich are then manipulated, put into an array, and then the array is returned. When I try to display the data from the array outside of the function, it returns nothing. Any help is greatly appreciated.
Here is my code;
function Buy5Grenades($Money, $grenades)
{
$Price = 70;
if ($Money < $Price)
{
echo('You do not have enough money.');
}
else
{
$Money -= $Price;
$Grenades += 5;
$ReturnedData = array($Money, $Grenades);
}
return $ReturnedData;
}