My problem with json and php: How to generate something like below part of json script table contain another Table with the same structure nested in it? I want to generate that from php code using mysql. I have searched too in web, but I didn't find any solution. I just found like this in postgre database by using "WITH" clause that doesn't support in mysql yet in My problem with json and php: How to generate s