I have a method in my class that I want to return more than one value:
public function lockFields($lockFieldsDBs, $lockValueConstant) {
if ($lockFieldsDBs == $lockValueConstant) {
$lockFieldValue = 'readonly="readonly"';
$lockImage = 'image_url_goes_here';
}
else {
$lockFieldValue = null;
$lockImage = null;
}
return $lockField;
return $lockImage;
}
...........
$lockFieldsDBs = 'OK';
$lockValueConstant = 'OK';
$formHandler->lockFields($lockFieldsDBs, $lockValue);
When trying to print out a value like this: echo $lockImage;
, I am getting Undefined variable: lockImage
.
Why isn't the value being returned?