hi all,
i am having a doubt.How can i round off 005 to 5 and 000007 to 7 like this if the user enters in textbox.
please help me..

Can you not just cast the value to an integer?

(int)000007 = 7

cast your value using (int).

<?php
	$newvalue=(int)$_REQUEST['userinput'];
?>

no actually i am having a textbox where we can allocate memory to user.so if i giv 00050 it is taking as it is. but actually i need it to take as 50

I guess name of textbox is userinput. so when you submit you form for processing in processing page you can trim the leading zeros by casting it.

<?php
	$newvalue=(int)$_REQUEST['userinput'];
?>

I guess you are asking for php solution as you have posted it in php forum

$newvalue = (int)"00050";
echo $newvalue;

Just check it directly.

hahaha.. i got it. Thank u for u both