为什么我不能这样做?还是我只是语法错误?
$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;