class - php classes use of $game->details->something -
I do not understand what people do when they are $ game- & gt; Details- & gt; Some people can please explain it.
This code means that Semi-pseudo-code $ game is probably a game class Example, in which the description is within another object (only one more attribute) within the game class, and there is a feature within some detail class.
class games {public $ details; Function __ Construct () {$ this- & gt; Details = new details (); }} Class details {public $ something; Public __construct () {$ this- & gt; Some = "mike"; }} $ Game = new game (); Echo $ game- & gt; Details- & gt; some; // print mike
Comments
Post a Comment