hekopeko Posted November 12, 2011 Share Posted November 12, 2011 hi there , i had a simple experience develop small php page to show blog posts through wordpress but lets say i want to split my page to be html and php for server code this is my php code , i need help about how to show this return values on html control , like label or textarea etc <?php include("./blog/wp-blog-header.php"); $posts = get_posts('numberposts=3&order=DES&orderby=post_date'); foreach ($posts as $post) : start_wp(); the_category_rss( $type ) ; the_date(); echo "<br />"; the_title(); the_excerpt(); endforeach; ?> Link to comment https://forums.phpfreaks.com/topic/250989-im-just-new-to-using-php-in-html-i-need-help-to-show-values-of-php-code/ Share on other sites More sharing options...
trq Posted November 12, 2011 Share Posted November 12, 2011 What exactly is the question? Link to comment https://forums.phpfreaks.com/topic/250989-im-just-new-to-using-php-in-html-i-need-help-to-show-values-of-php-code/#findComment-1287571 Share on other sites More sharing options...
hekopeko Posted November 12, 2011 Author Share Posted November 12, 2011 i need to show as simple example the value of function the_title() to html control , label or anything Link to comment https://forums.phpfreaks.com/topic/250989-im-just-new-to-using-php-in-html-i-need-help-to-show-values-of-php-code/#findComment-1287573 Share on other sites More sharing options...
Melvinchii Posted November 16, 2011 Share Posted November 16, 2011 You can use echo the_date() . '<br />' . the_title(); echo the_excerpt(); That will return just text. Also, take a look at this Foreach. And what is "$posts = get_posts('numberposts=3&order=DES&orderby=post_date');" putting into $posts? Link to comment https://forums.phpfreaks.com/topic/250989-im-just-new-to-using-php-in-html-i-need-help-to-show-values-of-php-code/#findComment-1288558 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.