I haven't been able to get ncurses_delwin to work, so instead I've been overwriting the window with spaces (which is probably not the best way to go, but it works):
for ($i = 0; $i <= $rows; $i++) {
ncurses_wmove($window, $i, 0);
ncurses_whline($window, 32, $cols);
}