I want to get lists from lists table, users from users table and posts from posts table where
lists.user_id = users.id
lists_posts.list_id = lists.id
and lists_posts.id = posts.id
I write the query using Joins and getting for multiple posts duplicated lists and users but i want to get posts in such a way that for each user+list comination there shld be multiple posts in the result.
If you need that sort of output you're going to have to parse the MySQL dataset using your favourite scripting language (which in this case looks like PHP).
What you're asking for is a 3D like structure, arrays of arrays of arrays, unfortunately MySQL has no way of providing this sort of output.