get_$field($id1, $id2 = null)

A "getter" method will be automatically created for each variable of the class. The "getter" method is named the variable prepended by "get_" (e.g. get_person_id() get_name() get_email() get_age()). The getter returns "false" if the variable is not set. It returns the value if the variable is set.

Example:

example.php
<?php
include("lib.php");
load("person");

$p = new person($_GET['person_id']);
$name $p->get_name();
echo 
$name;
?>