Kai: Frage zu JSON

Beitrag lesen

{"results":[
        {"id":1,"name":"Ant"},
        {"id":2,"name":"Bear"},
        {...} // more results here...
    ]}

Hab jetzt

  
<?php  
  
$results = array(  
                                "results" => array(  
                                        array("id"=>"1","name"=>"Ant"),  
                                        array("id"=>"2","name"=>"Bear"),  
                                        array("id"=>"3","name"=>"Cat"),  
                                        array("id"=>"20","name"=>"Tapir")  
                                )  
                        );  
  
$results = json_encode($results);  
echo $results;  
?>  

aber auch so will es nicht.

Kai