title: Message formatting in Slack in using blocks layout
body: <p>I want to send message to my slack app using the blocks layout format. I create an associative array in PHP and then use json_encode() to convert it to JSON. The problem is that it is not converted into the JSON format slack is expecting and I get an error 'invalid blocks format'. Here is my code, the output and the output expected by slack.</p>
  
  <pre><code>$data = array(
      'blocks' =&gt; array(
          'type' =&gt; 'mrkdwn',
          'text' =&gt; 'Danny Torrence left the following review for your property'
      ),
  );
  $data = json_encode($data);
  </code></pre>
  
  <p>I get the following output:</p>
  
  <pre><code>{"blocks":{"type":"mrkdwn","text":"Danny Torrence left the following review for your property"}}
  </code></pre>
  
  <p>However, Slack is expecting the JSON in the following format:</p>
  
  <pre><code>{"blocks":["type":"mrkdwn","text":"Danny Torrence left the following review for your property"]}
  </code></pre>
  
  <p>I just need to convert one '{' to '[' and one '}' to ']' in the end. I would appreciate any help.</p>
  
  <p>Thanks</p>