hi all
i have problem with save zero before number in the var

example

$num=0024;

echo $num;// show 24

Recommended Answers

All 3 Replies

Simply use double quotes.
ie., $num="0024"; Adding 0 before a number forces php to consider this as a octal number.
http://us3.php.net/int

THX

:) You are welcome!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.