On 31/07/07, Hulf <[EMAIL PROTECTED]> wrote:
> I am outputting a selectbox and want to do the follwoing. How can I add the
> IF statement inside the the echo?

Something like this:-

for ($value = 0; $value <= 2000; $value += 100) {

 echo "<option value=\"$value\";
 if ($min_rent==$value) {
 echo "selected=\"selected\"";
  }
 echo "> $value</option>";

Alan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to