Fix calc field tooltip HTML

1. Fix example so pre tag displays correctly.
2. Put php examples into pre blocks.