I'm learning about classes and objects in PHP, and I'm getting really confused. This is what I have so far:
<?php
class ipInfo {
public $test1 = 'test';
}
$test = new ipInfo();
echo $test->$test1;
?>
Whenever I run it, I get these errors:
Notice: Undefined variable: test1 in //// on line 9
Fatal error: Cannot access empty property in //// on line 9
$in->$test1