PHP的Web服务[关闭]

i am new for webservice.

i want to out put like below...

"id": "11",
"cid": "12",
"cat_name": "aaaaaa",
"name": "ssaa16",
"image_path_big": "http:\/\/aaa.com\/images\/product\/ww44_533345b.jpg",
"image_path_thumb": "http:\/\/aaa.com\/images\/product\/thumb\/ww44_533345b.jpg",
"size": 
    [
        {"size": "4"},
        {"size": "3"},
        {"size": "5"},
        {"size": "2"}
    ],
"priceChart":
    [
        {
        "finish": "sss",
        "price":
            [
                {"finish": "55"},
                {"finish": "11"},
                {"finish": "12"},
                {"finish": "10"},
                {"finish": "15"}
            ]
        },
        {
        "finish": "ddd",
        "price":
            [
                {"finish": "55"},
                {"finish": "11"},
                {"finish": "12"},
                {"finish": "10"},
                {"finish": "15"}
            ]
        }
    ],
    "isN": "0"
}

So how can i get this type of format using json, php and mysql.

i have no more idea about webservices

Thanks in advance

Create an array in PHP, then use json_encode() PHP method. See the manual