How to stop PHP using standard form?
Moderator: General Moderators
-
branty1970
- Forum Newbie
- Posts: 2
- Joined: Wed Jul 23, 2008 12:41 pm
How to stop PHP using standard form?
I have a database with some codes in it such as 9t3 or 9e2. When I echo out the result of a query that is 9e2 PHP thinks this is a number in standard form and converts it. How can I stop it doing this and make it display 9e2?
Re: How to stop PHP using standard form?
Code: Select all
echo (string)$value;
// or
echo strval($value);
There are 10 types of people in this world, those who understand binary and those who don't
-
branty1970
- Forum Newbie
- Posts: 2
- Joined: Wed Jul 23, 2008 12:41 pm
Re: How to stop PHP using standard form?
Thank you - worked a treat.