PHP expert |
|
<?php
include("../includes/ubb_class.php");
$ubb = new ubb;
function ubb_uitvoer($text) {
$text = nl2br($text);
$text = stripslashes($text);
$text = wordwrap2($text);
$text = $ubb->parse_s($text);
$text = $ubb->parse_i($text);
$text = $ubb->parse_u($text);
$text = $ubb->parse_b($text);
$text = $ubb->parse_url2($text);
$text = $ubb->parse_quote($text);
return $text;
}
<?php include("../includes/ubb_class.php"); $ubb = new ubb; function ubb_uitvoer($text) { $text = wordwrap2($text); $text = $ubb->parse_s($text); $text = $ubb->parse_i($text); $text = $ubb->parse_u($text); $text = $ubb->parse_b($text); $text = $ubb->parse_url2($text); $text = $ubb->parse_quote($text); return $text; }
en zo roep ik het aan:
<?= ubb_uitvoer($output['text']); ?>
<?= ubb_uitvoer($output['text']); ?>
waarom werkt dit niet?
Citaat: Fatal error: Call to a member function on a non-object in /home/b2l1843/public_html/Simon/game/tavern_view.php on line 18
Lijn 18: $text = $ubb->parse_s($text);
EDIT: ik heb het gevonden, ik moest een global toevoegen in de functie
|