Okay, I'm completely lost...
What I am trying to do is update one row in my database.
$sizes = array($_POST['size_0'],
$_POST['size_1'],
$_POST['size_2'],
$_POST['size_3'],
$_POST['size_4']);
$sizes_upd = implode(", ", $sizes);
mysqli_query($con, "UPDATE beds
SET `Available Sizes` = '$sizes_upd' " .
"WHERE ID = '$prod_id' ");
My Problem is that not all of my $_POST[] contain data. So let us say for instance $sizes[0] && $sizes[1] contain data, the following string is returned:
value1, value2, , , ,
How do I prevent this so that only the $_POST[] with data returns a value?