Re: [PHP] if inside an echo.
- From: alan@xxxxxxxxxxxxxxxxxxx ("Alan Milnes")
- Date: Tue, 31 Jul 2007 12:41:16 +0100
On 31/07/07, Hulf <ross@xxxxxxxxxxxxxx> 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
.
- Follow-Ups:
- RE: [PHP] if inside an echo.
- From: "Edward Kay"
- RE: [PHP] if inside an echo.
- References:
- if inside an echo.
- From: "Hulf"
- if inside an echo.
- Prev by Date: Re: Includes eating up my time
- Next by Date: Re: [PHP] if inside an echo.
- Previous by thread: Re: [PHP] if inside an echo.
- Next by thread: RE: [PHP] if inside an echo.
- Index(es):