Functions

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

 



I am trying to create a function to clean up variables that are user
inputted from a form.  I am not getting this script to work.  Can anyone
help.

---Start Script---
function cleaner($var)
{
trim(strip_tags(ucfirst(addslashes($var))));
}

$var = "abc's";

echo $var;
---End Script---

When I run the above script it produces nothing. Instead of a result of
"Abc\'s".

[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