title: Convert 24 hour format hours into 12 hour format time in php
body: <p>How can I convert 24 hour format hours into 12 hour format time in php like 1630 should be 4:30 PM.</p>
  
  <p>there are articles to convert 24 hour format time into 12 hour format time like 16:30 into 04:30 PM but I need to convert hours into time.</p>
  
  <p>I am doing it by dividing it by 1200 and get remainder as minute but I hope there is another way to do it using date or time functions.</p>