can you help me what is
here

$this->contents = $contents;

it must be like this

$this->contents=$contens

musn't it?
thanks for attention beforehands

<?php
class Box
{
  var $contents;

  function Box($contents) {
    $this-&gt;contents = $contents;
  }

  function get_whats_inside() {
    return $this-&gt;contents;
  }
}

$mybox = new Box("Jack");
echo $mybox-&gt;get_whats_inside();
?>

Yes you are right... seems you just copy-pasted some code from a buggy site... (The &gt; is the HTML entity for ">")

thank you very much

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.