Als ik een class hebt met 2 functies. Hoe kan ik dan de string in de bovenste class in de 2de functie gebruiken??
Ik heb nu zoietS:
Maar dit wilt niet werken, dus hoe krijg ik dit dan werkend?
Alvast bedankt.
Ik heb nu zoietS:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/class"]class[/URL] test [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/public"]public[/URL] [COLOR= #0000BB]$test[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] a[COLOR= #007700]() {[/COLOR]
[COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]test [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]test[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] b[COLOR= #007700]() {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]test[COLOR= #007700];
}
}[/COLOR]
[COLOR= #0000BB]$test[/COLOR] [COLOR= #007700]= new[/COLOR] test[COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$test[/COLOR][COLOR= #007700]->[/COLOR]b[COLOR= #007700]();[/COLOR]
?> Maar dit wilt niet werken, dus hoe krijg ik dit dan werkend?
Alvast bedankt.
Hier werkte het gewoon 
