ID: 20036 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: Arrays related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php see http://www.php.net/manual/en/language.types.boolean.php#language.types.boolean.casting Previous Comments: ------------------------------------------------------------------------ [2002-10-23 04:04:40] [EMAIL PROTECTED] I wrote a function like that function rm_empty_values($array) { $x = 0; foreach ($array as $key => $value) { if($value) { $array_temp[$x] = $value; $x++; } } return $array_temp; } $hede = array("hede", "hodo", "0", 1); $list = rm_empty_values($hede); print_r($list); but it removes $hede[2] (0 value) too and i modified my function to function rm_empty_values($array) { $x = 0; foreach ($array as $key => $value) { if(($value) || ($value == "0")) { $array_temp[$x] = $value; $x++; } } return $array_temp; } and it works. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20036&edit=1
