ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-general
php-general
[PHP] Functions
by Benc11@Gmail.Com other posts by this author
Jun 29 2006 10:01PM messages near this date
Re: [PHP] [JS question] : I want to block onChange event in Firefox... | Re: [PHP] Functions
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".
Thread:
Benc11@Gmail.Com
Richard Lynch
Gerry D
Richard Lynch
Chris
Benc11@Gmail.Com
Amit Arora
Stut
John Meyer

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved