This probably sounds like a stupid question but i can't figure it out. I have a survey that has the old 'strongly agree', 'agree', etc. I have a script that can count each instance of 'strongly agree' or whatever the value. I want to turn it into a function because i need to use it more than one time on a page.
example:
function count(){
if ($variable == "strongly agree"){
$variable_count++;
}
if ($somethingelse == "somethingelse"){
$somethingelse_count++;
}
}
count();
while($this = $that){
count();
}
echo"$variable_count, $somethingelse_count";
Now the trouble I am having is that nothing is echoed out. I suspect no data is going in or coming out of the function. I this case, how would one pass data in or out.
thanks,
mojodojo