I think there a easier way to perform the same function but without if statements.
if (isset($_GET['limit']))
{
$limit = $_GET['limit'];
}
else
{
$limit = 10;
}
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.
If there is I’d be open to hearing it…
…But I think your best bet is just a short hand if/else statement instead. Not that it really makes any difference.
More info here – http://www.lizjamieson.co.uk/9/short-if-statement-in-php/