Thanks for any help you can give in advance. This is what I'm trying to do...I have entries going into a database. The entries can be UP to 1500 words. I want the query results from the database to be formatted for publishing in a book. For instance, every 5-8 sentences is a paragraph, at every new paragraph you indent, if one entry is less than a paragraph (i.e. 10 words) continue the next entry where the last entry left off until 5-8 sentences is reached.
Currently I have it coded whereby every entry is indented but that is all. This is the code I have:
Expand|Select|Wrap|Line Numbers
- <style>
- p.new {
- text-indent:1em;
- margin-top: 0;
- margin-bottom: 0;
- margin-left: 0;
- margin-right: 0;
- font-size: 18px;
- }
- </style>
mysql_select_db ($sql_db);
if(isset($_GET['topic']))
{
$topic=$_GET['topic'];
$query="SELECT ENTRY FROM entries WHERE TOPIC='$topic'" ;
}
elseif(!isset($ _GET['topic']))
{
$query="SELECT ENTRY FROM entries";
}
$result = mysql_query($qu ery) or die (mysql_error()) ;
$num=mysql_num_ rows($result);
$i=0;
$Z=i+1;
if($i<$num)
{
while($i<$num)
{
$myentry=mysql_ result($result, $i, "ENTRY");
echo '<p class="new">' .$myentry.'</p>';
$i++;
$Z++;
}
}
else{
echo "There are no entries in the database";
}
?>[/PHP]
Can someone help me accomplish what I'm trying to do.