Re: Functions

From: Date: Fri, 30 Jun 2006 05:12:04 +0000
Subject: Re: Functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-238954@lists.php.net to get a copy of this message
Two things: 1. You're not returning anything from the function. 2. You're not even using the function. benc11@gmail.com wrote:
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".
-- Online library -- http://pueblonative.110mb.com 138 books and counting.

« previous php.general (#238954) next »