Author Topic: What is the "MY"  (Read 1980 times)

0 Members and 1 Guest are viewing this topic.

fturner

  • Guest
What is the "MY"
on: Fri, 05. July 2002 - 17:04:00
// 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

  • Guest
What is the "MY"
Reply #1 on: Fri, 05. July 2002 - 17:10:00
Oops, that's a bug!

It should simply read:
Code: [Select]

  // 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;



Apologies.
Take a look at the examples section for other examples.

Kelvin