function display() { if ($this->jump == true) { $say = '<p> <strong>The ball was delivered ' . $this->arm . ' handed by ' . $this->name . ' with great skill!</strong> </p>'; } else { if ($this->jump == false) { $say = '<p> <strong>The ball was delivered ' . $this->arm . ' handed by ' . $this->name . ' with little skill!</strong> </p>'; } } return $say . ' <p> Skill One ' . $this->speed . ' / ' . $this->skill1 . ' </p> <p> Skill Two ' . $this->jump . ' / ' . $this->skill2 . ' </p>'; } } ############################# ############################# ##USAGE Example ############################# ############################# $bowler = new action(); $bowler->set('Steven Finn', 'r', rand(0, 100), rand(0, 100)); echo $bowler->display();
function assoc_links($id) { $tempArray = thesaurus::get_assoc($id); echo "<form method='get' action='index.php' name='vb'>"; echo "<fieldset>"; echo "<legend>Verwandte Begriffe</legend>"; $x = 0; $listArray = array(); if ($tempArray) { foreach ($tempArray as $entry) { $listArray[$x++] = thesaurus::get_descriptor($entry); } } echo_selection($listArray, "id", "", 3, "assoc-field"); // display action line action::display($id, 3); echo "</fieldset>"; echo "</form>"; }