I have the following code:
$a=$_POST['dsaghgjjkhfdsfdsfsdfdsjhkhkhgj'];
if(isset($a))
{
echo"exists";
}
else
{
echo"does not exist";
}
echos the value "does not exist", HOWEVER when i apply trim to the $_POST variable,
$a=trim($_POST['dsaghgjjkhfdsfdsfsdfdsjhkhkhgj']);
if(isset($a))
{
echo"exists";
}
else
{
echo"does not exist";
}
the code will echo "exists". Why does passing in a non-existing $_POST variable to trim() magically makes it exist?