We can think of choosing students 1 at a time for each position in the front row, and how many choices we have at each point.
For our first choice we have 23 options, for our second choice we have 22 options, for our second choice we have 21 options, and so on.
Therefore the number of ways we can arrange 5 students from 23 students is
23x22x21x20x19 = 4,037,880