RE: [PHP] RES: php x netscape
| From: | Jerry Hutchings | Date: | Thu, 29 Jun 2000 13:49:00 +0000 |
| Subject: | RE: [PHP] RES: php x netscape | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3799@lists.php.net to get a copy of this message | ||
<?php
function table ($moo) {
$ret = "<table>$moo</table>";
return ($ret);
}
$foo="rows";
echo table($foo);
?>
and
<?php
class bar
{
function table ($moo)
{
$ret = "<table>$moo</table>";
return ($ret);
}
}//End - class
$help = new bar();
$foo="rows";
echo $help->table($foo);
?>
Works for me !!
Jerry
Programmer
I-D Media
I need to use a class and I have more functions in the class. But I've
tried using a separate function and not a method of a class and didnt work!
Carlos
-----Mensagem original-----
De: Ted Knudson [mailto:tedk@cyberlink.com]
Enviada em: quinta-feira, 29 de junho de 2000 01:01
Para: Carlos Henrique
Assunto: RE: php x netscape
> In the class:
> function table (...) {
> $ret = "<table>...</table>";
> return ($ret);
> }
>
> In the page:
> echo $obj->table();
Try table();
Unless you have more code you have a function not a class.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net