I have a page that's returning data, on the ship date some values are null but return "as 01-01-1970". My goal is to return a blank field if the value is NUll on the DB. I wrote this statement, but it doesn't seem to work correctly. Trying to figure out how to solve this, I'm new to php any help is appreciated
<td><?php echo $row['status_details']; ?></td>
<td><?php echo $row['order_date']; ?></td>-->
<?php
$ship_date = $row['ship_date'];;
$ship_date = date("m-d-Y", strtotime($ship_date));
if($ship_date == 'NULL') {
$ship_date = ""
} else {
<td><?php echo $ship_date; ?></td> }
?>
<td><?php echo $row['shipped_qty']; ?></td>
<td><?php echo $row['shipping_carrier']; ?></td>
<td><?php echo $row['tracking_number'];?></td>