Tezread wrote:Piranha- I assume what you mean then is that this:
if (pqasso($score)>=1000) { print "From your response It looks like PQASSO is an option for you<br>"; }
else { print "PQASSO may not be an appropriate system for you"; }
if (pqasso($answer)>=1000) { print "From your response It looks like PQASSO is an option for you<br>"; }
else { print "PQASSO may not be an appropriate system for you"; }
if this is the case how do I echo the score for each function?
Yep, that is what I want. There is several ways to echo the result, a few examples below:
//Alternative 1:
$result = qpasso($answer); // Store the result of the function in a variable
echo $result; // Echo the result
//Alternative 2:
echo qpasso($answer); // The same as above, but without storing the variable
//Alternative 3:
// If you want to use it in a if-statement
if (pqasso($answer)>=1000) // The qpasso($answer) returns the result,
// meaning that it might return for example 2000.
// Then the statement becomes 8f (2000>=1000) {
{
// some code
}
I think that before you really understands functions you should always store what is returned from a function and then use it. That way you will understand functions and return values easier.
I hope that you get it. If not then you need to read up on functions to really get to understand them. Unfortunatley I don't have a good site for that, but it should not be hard to find.