PHP + applet + ->

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tmt1
Forum Newbie
Posts: 1
Joined: Tue Jan 22, 2008 5:56 am

PHP + applet + ->

Post 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 .....
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Re: PHP + applet + ->

Post 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?
Post Reply