php - Ignore value from assoc array when display -
$result = mysql_query($sql_result); $newarray = array(); $index=0; while($row = mysql_fetch_assoc($result)){ $newarray[$index] = $row; $index++; }
i wanna ignore value - assoc array when display. me please.
if want remove columns containing value use array_filter:
function removeempty($v){ return $v != '-'; } while($row = mysql_fetch_assoc($result)){ $newarray[$index] = array_filter($row,"removeempty"); $index++; }
Comments
Post a Comment