title: In my discord webhook, I am getting the error: {"embeds": ["0"]}
body: <p>I am making a discord webhook for logging something, I have done it with the help of a template (I'm not good at php) and I keep getting the error: <code>{"embeds": ["0"]}</code></p>
  
  <p>I have already tried researching it, I haven't gotten back anything helpful. Mind the messiness I did this to test.</p>
  
  <p><strong>Here is my code:</strong></p>
  
  <pre><code>&lt;?php
    $url = "https://discordapp.com/api/webhooks/xxx"; // Censored for privacy
  
    $hookObject = json_encode([
        "username" =&gt; "Promotion Logs",
        "avatar_url" =&gt; "https://cdn.discordapp.com/icons/472520717515096078/60cc7dd2864c95a749516d1213359b67.png",
        "tts" =&gt; false,
        "embeds" =&gt; [
            [
                "title" =&gt; "Promotion Logs",
                "type" =&gt; "rich",
                "description" =&gt; "",
                "url" =&gt; "http://police.riverside-roleplay.com/promologs.php",
                "color" =&gt; hexdec( "0099ff" ),
                "fields" =&gt; [
                    [
                        "name" =&gt; "Name",
                        "value" =&gt; "dd",
                        "inline" =&gt; false
                    ],
                    [
                        "name" =&gt; "Rank",
                        "value" =&gt; "$rank",
                        "inline" =&gt; true
                    ],
                    [
                      "name" =&gt; "Their name",
                      "value" =&gt; "dd",
                      "inline" =&gt; true
                  ],
                  [
                    "name" =&gt; "Old rank",
                    "value" =&gt; "dd",
                    "inline" =&gt; true
                ],
                [
                  "name" =&gt; "New rank",
                  "value" =&gt; "dd",
                  "inline" =&gt; true
              ],
              [
                "name" =&gt; "Reason",
                "value" =&gt; "dd",
                "inline" =&gt; true
            ],
            [
              "name" =&gt; "Date",
              "value" =&gt; "dd",
              "inline" =&gt; true
          ],
              ]
            ]
        ]
  
    ], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE );
  
    $ch = curl_init();
  
    curl_setopt_array( $ch, [
        CURLOPT_URL =&gt; $url,
        CURLOPT_POST =&gt; true,
        CURLOPT_POSTFIELDS =&gt; $hookObject,
        CURLOPT_HTTPHEADER =&gt; [
            "Length" =&gt; strlen( $hookObject ),
            "Content-Type" =&gt; "application/json"
        ]
    ]);
  
    $response = curl_exec( $ch );
    curl_close( $ch );
  
    ?&gt;
  </code></pre>
  
  <p><strong>Here is the template I was using:</strong></p>
  
  <pre><code>&lt;?php
  
  // Replace the URL with your own webhook url
  $url = "https://discordapp.com/api/webhooks/0000000/ABCDEFGH....";
  
  $hookObject = json_encode([
      /*
       * The general "message" shown above your embeds
       */
      "content" =&gt; "A message will go here",
      /*
       * The username shown in the message
       */
      "username" =&gt; "MyUsername",
      /*
       * The image location for the senders image
       */
      "avatar_url" =&gt; "https://pbs.twimg.com/profile_images/972154872261853184/RnOg6UyU_400x400.jpg",
      /*
       * Whether or not to read the message in Text-to-speech
       */
      "tts" =&gt; false,
      /*
       * File contents to send to upload a file
       */
      // "file" =&gt; "",
      /*
       * An array of Embeds
       */
      "embeds" =&gt; [
          /*
           * Our first embed
           */
          [
              // Set the title for your embed
              "title" =&gt; "Google.com",
  
              // The type of your embed, will ALWAYS be "rich"
              "type" =&gt; "rich",
  
              // A description for your embed
              "description" =&gt; "",
  
              // The URL of where your title will be a link to
              "url" =&gt; "https://www.google.com/",
  
              /* A timestamp to be displayed below the embed, IE for when an an article was posted
               * This must be formatted as ISO8601
               */
              "timestamp" =&gt; "2018-03-10T19:15:45-05:00",
  
              // The integer color to be used on the left side of the embed
              "color" =&gt; hexdec( "FFFFFF" ),
  
              // Footer object
              "footer" =&gt; [
                  "text" =&gt; "Google TM",
                  "icon_url" =&gt; "https://pbs.twimg.com/profile_images/972154872261853184/RnOg6UyU_400x400.jpg"
              ],
  
              // Image object
              "image" =&gt; [
                  "url" =&gt; "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"
              ],
  
              // Thumbnail object
              "thumbnail" =&gt; [
                  "url" =&gt; "https://pbs.twimg.com/profile_images/972154872261853184/RnOg6UyU_400x400.jpg"
              ],
  
              // Author object
              "author" =&gt; [
                  "name" =&gt; "Alphabet",
                  "url" =&gt; "https://www.abc.xyz"
              ],
  
              // Field array of objects
              "fields" =&gt; [
                  // Field 1
                  [
                      "name" =&gt; "Data A",
                      "value" =&gt; "Value A",
                      "inline" =&gt; false
                  ],
                  // Field 2
                  [
                      "name" =&gt; "Data B",
                      "value" =&gt; "Value B",
                      "inline" =&gt; true
                  ],
                  // Field 3
                  [
                      "name" =&gt; "Data C",
                      "value" =&gt; "Value C",
                      "inline" =&gt; true
                  ]
              ]
          ]
      ]
  
  ], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE );
  
  $ch = curl_init();
  
  curl_setopt_array( $ch, [
      CURLOPT_URL =&gt; $url,
      CURLOPT_POST =&gt; true,
      CURLOPT_POSTFIELDS =&gt; $hookObject,
      CURLOPT_HTTPHEADER =&gt; [
          "Length" =&gt; strlen( $hookObject ),
          "Content-Type" =&gt; "application/json"
      ]
  ]);
  
  $response = curl_exec( $ch );
  curl_close( $ch );
  
  ?&gt;
  </code></pre>
  
  <p>My expected results is to make an embed with the fields I have setup. I had this before then I implemented it to a different page and changed a few things, then it was broken. Actual results is the error <code>{"embeds": ["0"]}</code></p>