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=
item1Item 1/option
option
This assumption is incorrect, these are just variables that most likely
contain unwanted whitespace, such as a \n. Consider using trim()
beforehand.
?php echo trim($item1) ?
Maybe I misunderstand your question. Also, no need for when printing
variables directly like that. echo $foo;
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
] Problem when displaying the $ character
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
4 matches
Mail list logo