# Menu/List within PHP echo

**URL:** <https://forum.kirupa.com/t/menu-list-within-php-echo/221821>\
**Category:** programming\
**Created:** [April 8, 2007, 7:15am UTC](https://forum.kirupa.com/t/menu-list-within-php-echo/221821 "2007-04-08T07:15:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![onemhunki](https://avatars.discourse-cdn.com/v4/letter/o/c57346/32.png) [@onemhunki](https://forum.kirupa.com/u/onemhunki)\
**Post date:** [April 8, 2007, 7:15am UTC](https://forum.kirupa.com/t/menu-list-within-php-echo/221821/1 "2007-04-08T07:15:52Z")

</div>

Folks,

I have a table that is called via the echo statement in php depending on variables in a MYSQL database. I can echo the menu/list, but need the list to display the data within the field partner\_gender

```php

<td><select name="select" id="partner_gender">
<option value="0" {if (!(strcmp(0, $partner_gender))) {"SELECTED"} }>Gender</option>
<option value="m" {if (!(strcmp("m", $partner_gender))) {"SELECTED"} }>Male</option>
<option value="f" {if (!(strcmp("f", $partner_gender))) {"SELECTED"} }>Female<option>
</select>

```

So how do I get the php if and variables to work within the other php echo statement?

Any ideas?
