Can we arrange a single table in two ways within a page .?

I'm in a situation where I need to arrange a single table in two ways within a page, When I test the first piece it works ,even the second piece works great when tested alone, but when I combine both they don't work.and after removing any one piece other doesn't work.

Its really strange to me as i'm new to php. Help me fix the problem.

And is this syntax valid if($var==games) { //do something }

Are you displaying the same results in the same order on your page? Is it one result or a list? If the display is different you can create another query, if its the same just set it to a var.

if($var=='games'){
//do something
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.