I want to compare two variables' value which is integer stored in string format. Does some one know how to how to convert string to integer? Thanks.
PHP is dynamically typed so
$string='1'; $integer=1; if($string==$integer) { echo("They match"); }
Will print "They match". You can [man]intval()[/man] if you need to convert to integer, but it's rarely needed.