Did you mean something like that you have (to?) all the orders fetched at the page load, and you need a separate page that shows the orders only of a particular user? If you meant that you need this to be done without having any PHP processing, you can do it by keeping a set of properties or an array of orders belong to each user. This could be something like...
I wouldn't recommend though, but you can generate the above code using a PHP foreach loop. Now, if you need to get all orders initiated by the user with the id 64, you can simply obtain them as
orders['user'+userId].
However, it should be noted that this is
not something
you should do if you follow the good practices. This does nothing but floods the browser with excessive memory consumption, if you have thousands of users. A better idea would be having the PHP codes to yield the Order objects belong to a given user. If you use some proper kind of database caching, this approach is much better than pre-fetching everything at the first page load.