08-07-2008, 07:26 PM
|
#2 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
It's a straight forward fix. You're using an echo statement inside of getUsersName(), correct? Instead of echoing the data, put it in a variable, and return it at the end of the function. Then it will work properly, and will allow you to do any of the following:
PHP Code:
$variable = $this->getUsersName(); // return to another var echo $this->getUsersName(); // echo it directly echo 'some string'.$this->getUsersName().'end of string'; // echo it within a string
-m
|
|
|
|