Created
November 24, 2011 14:20
-
-
Save uppfinnarjohnny/1391453 to your computer and use it in GitHub Desktop.
Something about lists, references and stuff, in php & python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$some_array[$some_id]['key_one'] = $value_one; | |
$some_array[$some_id]['key_two'] = $value_two; | |
$some_array[$some_id]['key_three'] = $value_three; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$item = &$some_array[$some_id]; | |
$item['key_one'] = $value_one; | |
$item['key_two'] = $value_two; | |
$item['key_three'] = $value_three; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
some_list[some_id].update({ | |
'key_one': value_one, | |
'key_two': value_two, | |
'key_three': value_three | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment