![]() |
How to Access a PHP Class Variable from Outside the ClassThe below script demonstrates how to access a PHP class variable from outside the class: <?php //variable will be global inside the object public $my_var = 'testing'; function myFunctionName(){ //create an instance of the class as the $mine object //You access a class variable from outside the class using the arrow operator. The arrow tells php that the variable is part of the $mine object
|
|
All Content ©2020 WebRef.eu |