note 88736 added to function.array-count-values

From: Date: Thu, 05 Feb 2009 07:50:47 +0000
Subject: note 88736 added to function.array-count-values
Groups: php.notes 
Request: Send a blank email to php-notes+get-150247@lists.php.net to get a copy of this message
psbauman, The reason your zeros are stripped is because you are storing that initial leading-zero value as an integer. For example: $id_numbers[0] = 0056789; rathern than: $id_numbers[0] = "0056789"; If you store it as a string, the leading zeros will be kept. Try printing out the value of $id_numbers[0] right after you set it, and you will see what I mean. TC ---- Server IP: 208.69.120.35 Probable Submitter: 98.224.231.198 ---- Manual Page -- http://www.php.net/manual/en/function.array-count-values.php Edit -- https://master.php.net/note/edit/88736 Del: integrated -- https://master.php.net/note/delete/88736/integrated Del: useless -- https://master.php.net/note/delete/88736/useless Del: bad code -- https://master.php.net/note/delete/88736/bad+code Del: spam -- https://master.php.net/note/delete/88736/spam Del: non-english -- https://master.php.net/note/delete/88736/non-english Del: in docs -- https://master.php.net/note/delete/88736/in+docs Del: other reasons-- https://master.php.net/note/delete/88736 Reject -- https://master.php.net/note/reject/88736 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#150247) next »