English support > General questions
What is the "MY"
(1/1)
fturner:
// include the vlibTemplate class include('vLIB/vlibTemplate.php');
In the .PHP side of the example there is a my statement before the $tmpl (see below).What is this? I can't figure it out.!?
-------------code below ------------
// make $tmpl an object of vlibTemplate
my $tmpl = new vlibTemplate('food.htm');
// set the variables
$tmpl->setVar('FAV1', 'Fish and Chips'); $tmpl->setVar('FAV2', 'fajitas');
// print the template
$tmpl->pparse;
----------------------end code -------------
releasedj:
Oops, that's a bug!
It should simply read:
--- Code: ---
// include the vlibTemplate class
include'vLIB/vlibTemplate.php';
// make $tmpl an object of vlibTemplate
$tmpl = new vlibTemplate'food.htm';
// set the variables
$tmpl-setVar'FAV1', 'Fish and Chips';
$tmpl-setVar'FAV2', 'fajitas';
// print the template
$tmpl-pparse;
--- End code ---
Apologies.
Take a look at the examples section for other examples.
Kelvin
Navigation
[0] Message Index
Go to full version