How to send values from mysql to php table with mask

  html, javascript, mysql, php

I have a mysql database with a zipcode column with values "0000000". Now I want to echo on a table with a mask like "0000-000", how do i do it?
And i have to send it to the database with the mask "0000000" because i’m using a api.

Source: Ask PHP