Jump to content

mcsquiddy

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mcsquiddy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Got it working, I was being a moron. Thanks guys!
  2. I was using Xamp and now Wamp, I was running the files from the htdocs folder, Is there a better way to test my files?? thanks.
  3. I am trying to create a very basic object but am having troubles. <?php class item{ public $name; public $price; function __construct($name,$price){ $this->name=$name; $this->price=$price;} function getName(){ return $this->name; } } $object = new item("car",400); echo $object->getName(); ?> The HTML output is: name=$name; $this->price=$price;} function getName(){ return $this->name; } } $object = new item("car",400); echo $object->getName(); ?> I'm sure that this code is clean but for some reason will not output the desired result! any help would be great. thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.