Re: Functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



benc11@xxxxxxxxx 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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux