Re: Functions
| From: | Stut | Date: | Fri, 30 Jun 2006 19:54:38 +0000 |
| Subject: | Re: Functions | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-239018@lists.php.net to get a copy of this message | ||
benc11@gmail.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