I need to know how I can echo $host from the following class:
class JConfig {
public $host = 'localhost';
}
any ideas?
Thanks!
$jc = new JConfig();
echo $jc->host;
You may want to look into static variables though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With