From 871ca108d2a34fbcdbe1fa68954a4af48822ddba Mon Sep 17 00:00:00 2001 From: Neil Masters Date: Thu, 13 Mar 2014 09:56:01 +0000 Subject: [PATCH] Update The-Basics.md Added section for using brackets for both form and function. I would appreciate a second set of eyes over this to clarify its easy to understand. --- pages/The-Basics.md | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/pages/The-Basics.md b/pages/The-Basics.md index b6866ea..e3d7708 100644 --- a/pages/The-Basics.md +++ b/pages/The-Basics.md @@ -325,6 +325,58 @@ This can also be said for all operations(===, !==, !=, == etc). {% endhighlight %} +#### Utilising brackets with ternary operators for form and function + +When utilising a ternary operator, brackets can play their part to improve code readability and also to include unions within blocks of statements. An example of when there is no requirement to use bracketing is: + +{% highlight php %} +