function ($value, $type) {
if ($value === null) return '';
if (is_array($value))
return $this->($value, $type);
switch ($type) {
case "boolean":
return $this->($value);
case "number":
return $this->($value);
case "currency":
return $this->($value);
case "string":
return $this->($value);
case "html":
return $this->($value);
case "date":
return $this->($value);
case "timestamp":
return $this->($value);
case "email":
return $this->($value);
case "time":
return $this->($value);
default:
if ( is_object($value) )
return $this->($value);
else
return "$value";
}
}
|