class Example {
private static $table_name = "tblTable";
private function whatever() {
$query = "SELECT * FROM self::$table_name";
. . .
}
}
self::$table_name does not parse as tblTable, rather it looks for the table self::tblTable. How can I get this to parse correctly?
As I was writing this I realized I could:
$query = "SELECT * FROM " . self::$table_name;
However if there is still a way to include a scope resolution operator within a string I would like to know.
Thank you!