Back
For example - Arrays with named indexes or hashes. Something like PHP code;
$array = array("foo" => "some foo value","bar" => "some bar value",);
$array = array(
"foo" => "some foo value",
"bar" => "some bar value",);
Thanks
There is something similar to what you're looking for it is a type called mapping:
contract MappingExample { mapping(address => uint) public balances; function update(uint newBalance) { balances[msg.sender] = newBalance; }}
you can refer the link below for more details
http://solidity.readthedocs.io/en/develop/types.html#mappings
31k questions
32.8k answers
501 comments
693 users