Move to end of foreachloop? I have a foreachloop that looks like this:

 `foreach ($categories as $category) {`

`// code in here`

`}`

I need to make it so that if the $category is equal to a certain value, then execute that $category last. 

If there any easy way to do this in php?

Thanks!