drupal - php array selector unsure of differnce -


Hi I'm working with Drupal and it uses arrays at one level. I'm not much with the family , I have a quick question which is the difference between these 'selectors' (which is the correct word)? $ node ['field_geoloc']

This is an error cause "Fatal Error: Can not use type object as stdClass array ... "

 / Pre> 

This works (im is using it in an if! = Null statement)

  $ node- & gt; Field_geoloc   

Hope that's a simple question ... thanks.

is very easy .. error says all this:

"Fatal Error: You can not use type objects as stdClass as an array ..."

You are trying to use an object as an array.

The object property is not accessible using the $ array ['key'] method, which you have used, the need to use properties like you Is:

  `$ Object-> Property '  

If you have any object, you can obtain properties from that array using the method but I know from experience that you have to do that method with $ node in the drawer Should not be used.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -