<?php
function
getStatus (device) {
if
(
$device
.status != 0) {
return
'On'
; }
else
{
return
'Off'
; }
}
?>
http://www.w3.org/International/articles/text-reuse/
<p>
Printer:
<?php
print
getStatus
($printer
);?>
</p>
<p>
Stacker:
<?php print
getStatus(
$stacker
);?>
</p>
<p>
Stapler options:
<?php print getStatus(
$sOptions
);?>
</p>