How can I use a show function inside a loop?

See here: