X
X
Xooliganus2018-03-11 15:25:43
PHP
Xooliganus, 2018-03-11 15:25:43

How to create such an array programmatically (php)?

How to create such an array programmatically (php)?

{"response": {
        "count": 16,
        "items":[{
        "id": "1",
        "is_dir": "true"        
        },{
        "id": "2",
        "is_dir": "false"   
        }]  
    }
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2018-03-11
@Xooliganus

More or less like this

$array = [
"response" => [
"count" => 16,
"items" =>  [
[
 "id"=>"1",
        "is_dir"=> "true"    
],
[
 "id"=>"2",
        "is_dir"=> "false"    
]] ]]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question