I am writing a python script but I’m getting ideas from a php implementation. However, I’ve never spent time working on php before. Could someone explain to me this structure:
The original post has been edited. Consider the right hand side irrelevant. I’m trying to understand the data structure so I can write the python equivalent.
Thank you for your reply. I understand the general purpose; the value of the right-hand side is assigned at the structure of the left-hand side. I’m trying to understand the structure on the left-hand side.
What is the difference between
$array['vin'][$i]['txid']
and
$array['vin'][$i]
What sort of array is it? Why does it have two key indexes but assigns a single value? Is it a multidimensional array? is it something else? I could think of it as a python dictionary but the two key indexes confuse me.
So $array[‘vin’][$i] is just what VIN (in an array of VIN’s) that you are looking at. (or assigning values to)
So not only is it an array of VIN’s… but each VIN is an array as well… so you need to then access the data in the VIN (sub) array.
Unfortunately… I know ‘0’ Python… (although I plan on it playing with it soon… as I do Arduino/RaspberryPi projects… and it would probably be easier!) LOL
Your answer helped a lot. I managed to write the python version, although I believe it’s less efficient compared to this php implementation. I’ll work on it…