Why can't I carry a variable ($last_id) into a class?
//get value of last sql row
$last_id = $conn->lastInsertId():
//create class
Class CropAvatar {
private $id = $last_id;
private $src;
private $dstDir = '../some path';
}
private $src and private dstDir works fine.
How can I carry a variable's value into a class?