Jump to content

i'm just new to using php in html , i need help to show values of php code ?


hekopeko

Recommended Posts

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;
?>


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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.