phparraysobjectproperties

What is the difference between accessing an array element and accessing an object property?


Can someone explain to me by the most easiest way possible difference between following? After reading about PHP arrays, i still dont get it.

print $myArray[0]->token

and

print $myArray[0]["token"]

Edit:

Question is not about best approach, but about meaning of that. Answer can be fond here, but it is not direct answer to my question


Solution

    1. An object inside an array having token element
    2. An array inside an array having token element