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
Post a Comment