note 123416 added to language.types.array

From: Date: Tue, 11 Dec 2018 03:06:53 +0000
Subject: note 123416 added to language.types.array
Groups: php.notes 
Request: Send a blank email to php-notes+get-209869@lists.php.net to get a copy of this message
//array keys are always integer and string data type and array values are all data type //type casting and overwriting(data type of array key) //---------------------------------------------------- $arr = array( 1=>"a",//int(1) "3"=>"b",//int(3) "08"=>"c",//string(2)"08" "80"=>"d",//int(80) "0"=>"e",//int(0) "Hellow"=>"f",//string(6)"Hellow" "10Hellow"=>"h",//string(8)"10Hellow" 1.5=>"j",//int(1.5) "1.5"=>"k",//string(3)"1.5" 0.0=>"l",//int(0) false=>"m",//int(false) true=>"n",//int(true) "true"=>"o",//string(4)"true" "false"=>"p",//string(5)"false" null=>"q",//string(0)"" NULL=>"r",//string(0)"" note null and NULL are same "NULL"=>"s",//string(4)"NULL" ,,,In last element of multiline array,comma is better to used. ); //check the data type name of key foreach ($arr as $key => $value) { var_dump($key); echo "<br>"; } //NOte :array and object data type in keys are Illegal ofset....... ---- Server IP: 208.43.231.9 Probable Submitter: 103.242.216.114 ---- Manual Page -- http://php.net/manual/en/language.types.array.php Edit -- https://master.php.net/note/edit/123416 Del: integrated -- https://master.php.net/note/delete/123416/integrated Del: useless -- https://master.php.net/note/delete/123416/useless Del: bad code -- https://master.php.net/note/delete/123416/bad+code Del: spam -- https://master.php.net/note/delete/123416/spam Del: non-english -- https://master.php.net/note/delete/123416/non-english Del: in docs -- https://master.php.net/note/delete/123416/in+docs Del: other reasons-- https://master.php.net/note/delete/123416 Reject -- https://master.php.net/note/reject/123416 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#209869) next »