function acids(){
$acidsarray=array('lemonjuice','vinegar','sherry','champagne','orange');
$acids=array_rand($acidsarray);
echo $acids;
}
Hello, I'm new to programming and this is a function I've written, the idea is it's supposed to spit out one of the ingredients from the array; when I run it it returns a number, usually between 0 and 4, so it's doing something though not what I want it to do. Can you see where I'm going wrong?
I've written the function in python, using the same logic and it works fine.
Thank you