mysql - displaying a 12 hours format using php by Row -


im trying display/echo 12 hours format of column modification_out row.

while($row=mysql_fetch_array($raw_results)){        $username=$row['username'];   $details=$row['details_out'];   $details=$row['otherout'];   $modification_out=$row['modification_out']; 

i got trouble here:

echo "   <tr> <td><center>".$row['username']."</center></td> <td><center>".$row['details_out']."</center></td>  <td>date("m/d/y g:i a",".$row['modification_out'].")"</td>  <td><center>".$row['otherout']."</center></td> </td> </tr> "; 

i got error: notice: non formed numeric value encountered in

thanks replies guys, figure out answer.

<td>".date("m/d/y g:i a", strtotime($row['modification_out']))."</td> 

thanks.

you should concatenate call date() in same manner - looks rather odd in code.

echo "   <tr> <td><center>".$row['username']."</center></td> <td><center>".$row['details_out']."</center></td>  <td>".date("m/d/y g:i a", $row['modification_out'])."</td>  <td><center>".$row['otherout']."</center></td> </td> </tr> "; 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -