Sunday, September 20, 2026
HomeWordPress DevelopmentHTML dropdown setting not displaying final saved worth within the database

HTML dropdown setting not displaying final saved worth within the database


I desire a select-dropdown area to show the final saved possibility within the database; I began with this video from YT, https://www.youtube.com/watch?v=hbJiwm5YL5Q&t=3969s and obtained so far as 1:05:00 and that is my present model

perform selectpageHTML() {?>
            <choose title="lp_actPage"> 
                <?  $pages = get_pages();
                        foreach ( $pages as $web page ) {                               
                                $slug = $page->post_name;
                                $title = $page->post_title;
                                echo "<possibility worth="$slug"" . chosen(get_option('lp_actPage', $slug)) .">$title</possibility>";
                        } ?>
            </choose>
        <?} 

I additionally checked out Choose dropdown not displaying chosen worth php, however as an alternative of evaluating floats I am seeking to examine strings.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments