Skip to content
Advertisement

Tag: call

PHP read JSON Array with unknown variable

I have a Json Script with an Array inside and Array which looks like this shortened: Now I want to work with the single variables shortName, industry, etc. When I tried to call the function with it worked perfectly fine. When I use it is not working at all and gives me the following warning: Warning: Undefined array key “assets”

PHP – __call all the time

Say we have a class with several protected and/or public methods. I need to perform a check each time a method is called. I could do that check each time i call a method : or But i would like developers neither to have to think about it nor to write it. I’ve thought about using __call to do :

Advertisement