title: Getting elements from json data in php
body: <p>I know this question has been asked but still i am having issue in getting it right</p>
  
  <pre><code>{
    "status": "400",
    "msg": "List Of Lotteries",
    "lotteryRes": {
      "result": {
        "Disawar": [
          "Disawar"
        ],
        "DL Bazzar": [
          "DL Bazzar"
        ],
        "Faridabad": [
          "Faridabad"
        ],
        "Gaziyabad": [
          "Gaziyabad"
        ],
        "X90": [
          "X90"
        ],
        "Gali": [
          "Gali"
        ],
        "RAJASTHAN ROYAL": [
          "RAJASTHAN ROYAL"
        ],
        "Rajasthan Bazaar": [
          "Rajasthan Bazaar"
        ]
      },
      "lottery_date": [
        "2018-03-25 05:30:00",
        "2018-03-31 15:20:00",
        "2018-03-30 18:15:00",
        "2018-03-31 20:20:00",
        "2018-04-04 23:00:00",
        "2018-04-02 23:25:00",
        "2018-04-14 16:00:00",
        "2018-04-13 14:00:00"
      ]
    }
  }
  </code></pre>
  
  <p>I want to display the data like </p>
  
  <pre><code>&lt;option&gt;Disawar 2018-03-25 05:30:00&lt;/option&gt;
  &lt;option&gt;DL Bazar 2018-03-31 15:20:00&lt;/option&gt;
  </code></pre>
  
  <p>for every element above is a respective date and time ,I tried but its giving me errors like : Array to string conversion  and someother errors</p>
  
  <pre><code> $json = file_get_contents('url');
                  $obj = json_decode(stripslashes($json),true);
      echo "&lt;a href='#' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'&gt;  $obj[msg];&lt;span class='caret'&gt;&lt;/span&gt;&lt;/a&gt;
                      &lt;ul class='dropdown-menu'&gt;
                      &lt;li&gt;$obj[lotteryRes]&lt;/li&gt;
  </code></pre>
  
  <p>Any idea how to do that?</p>