<p>I am looking to convert a <code>MySQL timestamp</code> to a epoch time in seconds using <code>PHP</code>, and vice versa. </p>

<p>What's the cleanest way to do this?</p>

There are two functions in MySQL which are useful for converting back and forth from the unix epoch time that PHP likes:
from_unixtime()
unix_timestamp()
For example, to get it back in PHP unix time, you could do:
```
SELECT unix_timestamp(timestamp_col) FROM tbl WHERE ...
```