On Sat, 2009-05-09 at 18:22 +0530, kranthi wrote:
> var_dump($_POST['month'], intval($_POST['month']), $_POST['month'] ==
> ((int)($_POST['month']));
> var_dump($_POST['month'], intval($_POST['month']), $_POST['month'] ==
> (intval($_POST['month'])));

After I fixed your syntax error this worked fine for me in PHP 5.2.9:

string(3) "Jan"
int(0)
bool(true)
string(3) "Jan"
int(0)
bool(true)

<?php

$_POST['month'] = 'Jan';

var_dump( $_POST['month'], intval( $_POST['month'] ), $_POST['month'] ==
(int)$_POST['month'] );
var_dump( $_POST['month'], intval( $_POST['month'] ), $_POST['month'] ==
intval( $_POST['month'] ) );

?>

Your use of parenthesis shows you lack understanding of operator and
function use. All those parenthesis generally make things less readable
despite your best intentions to clarify the process.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to