php for is not working if i pass the values through variable

aviatiogfs

New Member
i am parsing a XML data with \[code\]simplexml_load_file()\[/code\] function and when i display the data using for loop its display correctly from the number i mention to the limit \[code\]<?phpfor($i=10; $i<=20; $i++){{ $offer->name;}?>\[/code\]but when i declare the values through variable it does not work.\[code\]<?php$result_start = $_REQUEST['start'];$result_limit = $_REQUEST['limit'];for($i=$result_start; $i<=$result_limit; $i++){{ $offer->name;}?>\[/code\]one more strange thing is happening here is that the loop is repeating 2 times more. like if i mention the loop from 10 to 20 so it is showing me the values from 10 to 22.
 
Back
Top