Re: Problem when displaying the $ character
| From: | EDUMEXICO | Date: | Wed, 03 Oct 2001 17:53:24 +0000 |
| Subject: | Re: Problem when displaying the $ character | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-69812@lists.php.net to get a copy of this message | ||
Hi, try this:
<?
echo "
<select name=\"menu\">
<option value=\"$item1\">Item 1</option>
<option value=\"$item2\">Item 2</option>
</select>";
?>
I hope this can help you. Cheers
On Wed, Oct 03, 2001 at 11:08:27AM -0700, Dominik wrote:
> Through php, I run a function that creates a list of items in a select menu
> as follows:
>
> <select name="menu">
> <option value="<? echo "$item1"; ?>">Item 1</option>
> <option value="<? echo "$item2"; ?>">Item 2</option>
> </select>
>
> but here is how the source code looks:
>
> <select name="menu">
> <option value="
> item1">Item 1</option>
> <option value="
> item2">Item 2</option>
> </select>
>
> It looks like php takes the $ character and inserts a return for it. This
> though disrupts the value of the form element. Is there anyway to make this
> code appear like it should (with the option tag all on one line instead of
> 2)?
>
> Thanks!
> Dominik
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Mauricio Téllez Jiménez
Seguimiento Técnico EDUMEXICO
edumexico@speedy.coacade.uv.mx
edumexico@speedy.uv.mx
edumexico@terra.com.mx
Zamora No. 25, Col. Centro
C.P. 91000, Xalapa, Ver.
Tel. 52(28)17-86-87, 17-73-80
Fax. 52(28)18-64-13