That's all a function of your database and how you display it on your page.
We can't see that script though ... we only see the result of it.
And even if you decide to show that script, it will really hard to direct you
on PHP without being able to test it out for ourselves ... we may be able to give
you some direction on which way to go. You should hire a freelancer that can
actually go into your website and program/test it directly on your site.