Sebastian wrote:
how do i delete keys from an array if it has no values?
eg, this:

[name] => Array
(
[0] => grape
[1] => apple
[2] => [3] => orange
[4] => [5] => cherry
)


to:

[name] => Array
  (
      [0] => grape
      [1] => apple
      [2] => orange
      [3] => cherry
  )


foreach ($name as $value) { if ($value) $buffer[] = $value; }

$name = $buffer;

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to