なぜ私はこれを行うことができないのですか?それとも、構文が間違っているだけですか?
$status = function() {
switch($job['status'])
{ case "CREATED": return "Created by <b>$creator</b> on " . date("jS \o\\f M Y",$job['ts']); break;
case "APPROVAL": return "Pending Approval."; break;
case "DEFERRED": return "Marked as <b>Deferred</b> by <b>$creator</b>."; break;
case "COMPLETE": return "Marked as <b>Complete</b>."; break;
}
}
echo $status;