What the .....? What im i doing wrong?

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
roger_keulen
Forum Newbie
Posts: 1
Joined: Mon Jun 03, 2002 1:16 pm

What the .....? What im i doing wrong?

Post by roger_keulen »

This returns "JobJob, JobJob" but it must return "JobJob, 11"

What i'm i doing wrong?


class defaultscript{
var $siteid;
var $scriptenigne;

etc..

class jobjobscript extends defaultscript{
function jobjobscript(){
$this->$siteid = 11;
$this->scriptengine = "JobJob";


$aid = $this->$siteid;
$ascriptname = $this->$scriptname
echo "jobjobscript class created $ascriptname, $aid<br>";
defaultscript::defaultscript();
}
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Not sure if it'll help but shouldn't

Code: Select all

$this->$siteid = 11; 
$this->scriptengine = "JobJob"; 


$aid = $this->$siteid; 
$ascriptname = $this->$scriptname
be

Code: Select all

$this->siteid = 11; 
$this->scriptengine = "JobJob"; 


$aid = $this->siteid; 
$ascriptname = $this->scriptname
Mac
honkyinc
Forum Newbie
Posts: 19
Joined: Tue Jun 04, 2002 10:30 am
Location: Maryland, USA

Post by honkyinc »

Don't you hate how sometimes the most obvious things to other people are things you'd NEVER catch? One of my pet peeves about programming... though admittely not much can be done about it.
User avatar
Johnm
Forum Contributor
Posts: 344
Joined: Mon May 13, 2002 12:05 pm
Location: Michigan, USA
Contact:

Post by Johnm »

Don't you hate how sometimes the most obvious things to other people are things you'd NEVER catch?
So it is not just me? Well, as they say... "Misery loves company". <g>
Direwolf
Post Reply