Epidemic Posted June 21, 2008 Share Posted June 21, 2008 Hey, I am using this in my script. $mins = 10000; It is an int but I was wondering if it needed to be speech marks e.g $mins = "10000"; Quote Link to comment https://forums.phpfreaks.com/topic/111278-solved-ints-in-speech-marks/ Share on other sites More sharing options...
.josh Posted June 21, 2008 Share Posted June 21, 2008 by speech marks you mean quotes? No, for the most part, php is a loosely typed language. It automatically converts data types as necessary. <?php $x = 10000; // initially considered an int echo 5 * $x; // output 50000 $x = "10000"; // initially considered as a string echo 5 * $x; // will still output 50000 Quote Link to comment https://forums.phpfreaks.com/topic/111278-solved-ints-in-speech-marks/#findComment-571197 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.