I have a php loop like :
for($i = $_GET['start']; $i < $_GET['end']; $i++){
echo $i;
}
when $i is assigned to something like 100000000000000000000 the script doesnt run and it returns no errors!! is there anywway I can fix this?
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The value you are using is too large for PHP to handle.
“The size of an integer is platform-dependent, although a maximum value of about two billion is the usual value.”
http://php.net/manual/en/language.types.integer.php
Here is the solution that I tested using strings instead of integers and it works: