my php code is like this:
<?php
require_once 'DBOperations.php';
$db = new DBOperations();
$data = $db->soilDescription($profile);
for($j=0; $j<sizeof($data); $j++)
{
<?php echo $data[$j]['consistence_moist']; ?>, <?php echo $data[$j]['consistence_dry']; ?>, <?php echo $data[$j]['conisitence_wet']; ?> Consistency;
}
Here, some postgres data may be null also. so we don't need ',' in null or empty values. I want output something like this: Plastic, Sticky Consistency;
But, I am getting output like this:
, , Plastic, Sticky Consistency;