开发者

php combo list values from function

开发者 https://www.devze.com 2023-03-16 17:22 出处:网络
I wanted the category_list function value to be inside my combo box but it\'s not working. Any gurus out there to help me? thanks!

I wanted the category_list function value to be inside my combo box but it's not working. Any gurus out there to help me? thanks! this is working

<tr>
    <td><?php echo $xx['evt_category'];?>:</td>
    <td>
        <select name="cat" id="cat">
            <?php if ($_SESSI开发者_开发百科ON['uid']!=1) {category_list($cat);} ?>
            </select>

    </td>

</tr>

this is not working

echo "<td><select id=\"cat\" name=\"cat\"></td>\n";
echo "<option value='".category_list($cat)."</option>\n";
echo "</select>\n";


If your first example is working, then this should be working:

echo '<td><select id="cat" name="cat">';
echo category_list($cat);
echo '</select></td>';
0

精彩评论

暂无评论...
验证码 换一张
取 消