I want to use for loop inside echo statement and I have used following code but its getting error can anyone please help me?
$a = "<select class='formfield_select' name='return_pickuptime_hh' id='rhh' disabled='disabled'>
<option value='' selected='selected' disabled='disabled'>Hour</option>
".for($i=$data['timeh'];$i <= 24;$i++) {."
<option value='".$i."'>".$i."</option>
". } ."
</select>";
This code is in ajax part so i need this whole html as one variable so that i can replace this part The error is like this syntax error, unexpected T_FOR in CI/application/controllers/lha.php on line 748