Re: [PHP] Functions
by Stut other posts by this author
Jun 30 2006 12:55PM messages near this date
Re: [PHP] Functions
|
Re: [PHP] Functions
benc11@[...].com wrote:
> I was able to get the return to work but not the pass in the reference.
> One
> last question, what if I want to have each item on a separate line like:
>
> function cleaner($var)
> {
> trim($var);
> strip_tags($var);
> ucfirst($var);
> addslashes($var);
> str_replace ("$","",$var);
> }
>
> $var = "abc's";
> echo $var;
>
> How would I return the results here, I tried various different ways none of
> them worked?
From your code snippet there are clearly too many fundamentals that you
don't seem to understand. I suggest you Google for a PHP beginners
tutorial, read it and then start again. You may have better luck after
you understand how PHP works. You may also want to look in the PHP
manual for the documentation for the functions you are using above, and
also at the section on functions. Everything you need is there - absorb it.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Benc11@Gmail.Com
Richard Lynch
Gerry D
Richard Lynch
Chris
Benc11@Gmail.Com
Amit Arora
Stut
John Meyer
|