title: Convert days to months and days in php
body: <p>I have a number 144 i want to convert to months and days, i.e. I want to display 3 months 24 days.</p>
  
  <p>What is the formula to do it? I have tried many methods but no use.</p>
  
  <pre><code>$sub_struct_month = ($result[0] / 30) ;
  $sub_struct_month = floor($sub_struct_month); 
  $sub_struct_days = ($result[0] / 30); // the rest of days
  $sub_struct = $sub_struct_month."m ".$sub_struct_days."d";
  </code></pre>