Page 1 of 1

PHP + applet + ->

Posted: Tue Jan 22, 2008 6:16 am
by tmt1
Hello,

I am a beginner of php and i am trying to put an applet in a php tag, but i didnt find how. Could you help me?
I post the code:

**** PLEASE USE THE

Code: Select all

TAG *****[/color]

Code: Select all

<?php 
 
class block_simplehtml extends block_base {
    function init() {
        $this->title = get_string('simplehtml', 'block_simplehtml');
        $this->version = 2004111200;
    }
    function get_content() {
    
    if ($this->content !== NULL) {
                      return $this->content;
        }
 
            $this->content = new stdClass;
        $this->content->text = 'The content of our SimpleHTML block!';  //HERE I WOULD LIKE TO PUT MY APPLET
            $this->content-> footer = 'Footer here...'; 
    
           return $this->content;
    }
    
}
 
?>
 
Futhemore I am trying to understand what the content->text means?Where I can use '->' in PHP ?
Please help me .....

Re: PHP + applet + ->

Posted: Wed Jan 23, 2008 2:08 pm
by anjanesh
Why are you using stdClass ? stdClass is a base class used internally. I hardly see anyone creating an object of stdClass.
Are you using Mambo CMS ?
Shouldn there be something like
$this->content->html instead of $this->content->text?