Jump to content

keeping space between two lines


localhost1

Recommended Posts

hi every body

 

this is not the problem in HTML tather it is in PHP. What I want to do is keep some space between the lines in the paragraph and the paragraph is defined not in the page where the text is to be displayed but in the admin part(CMS ) itself. how can i do it. the code with which the text added in CMS is displayed in front is like this. here in this code all the things written inside <? ?> are responsible for fetching the CMS texts

foreach($row1 as $res){
   
  			   $string=$res->page_description;
		   
		   $stringlength =strlen($string);
		   $pos=strpos($string,"COMMENT");
		  //echo $pos;
		   $len=strlen("COMMENT J'AI DECOUVERT LA TAROLOGIE:");
		  
			if(isset($pos))
		   {	
		   		$str1=substr($string,0,$pos);
				$str2="COMMENT J'AI DECOUVERT LA TAROLOGIE:";
				$str3=substr($string,-($stringlength-($pos+$len)),($stringlength-($pos+$len)));
		   }
		   elseif($stringlength<=500)
		  {	echo "true1";
		  	$sec= $string;
		  }
		  else
		  {
		  	$thd=substr($string,0,500);

			$frth=substr($string,-($stringlength-500),($stringlength-500));


			}	
  
  
  ?>
        <td valign="top" style=" width:163px; background:url(images/left_bg.jpg) repeat-y"><img src="images/left_img.jpg" alt="" width="163" height="537" /></td>
        <td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
          <tr>
            <td valign="top" > </td>
            <td align="center" valign="top" > </td>
          </tr>
          <tr>
            <td align="center" valign="top" class="contentfront" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td align="center" class="content_heading_top"> TAROLOGIE</td>
                </tr>
                <tr>
                  <td align="center" class="content_heading_top"> </td>
                </tr>
                
                <tr>
                  <td align="left" class="content" style="padding-left:10px; width:340px"><p align="justify" style="">
                    <?
			 if(isset($str1))
			 {	
			 	echo $str1;
			 }
			 elseif(isset($sec))
			 {
			 	echo $sec;
			 }
			 else
			 	echo $thd;
		  ?>
                  </p></td>
                </tr>
                
                
              </table></td>
            <td align="center" valign="top"  ><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td> </td>
              </tr>
              <tr>  <? foreach($row1 as $pg){?>
                <td align="center" valign="top"><img src="<? echo $pg->page_picture;?>" alt="" width="194" height="266" /></td>
			<? }?>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td colspan="2" align="left" valign="top" class="contentfrontchiromancie"  style="padding-left:10px; padding-right:10px "><? echo "COMMENT J’AI DECOUVERT LA TAROLOGIE:";?></td>
          </tr>
          <tr>
            <td colspan="2" align="left" valign="top" class="contentfront" style="padding-left:20px; padding-right:10px" >
              <? 
			if(isset($str3))
			 {
			 	echo $str3;
			 }

			 else
			 	echo $frth;

		?>
           
             </td>
            </tr>
        </table></td>
        <td valign="top" style="width:156px; background:url(images/right_bg.jpg) repeat-y"><img src="images/right_img.jpg" alt="" width="156" height="538" /></td>
    <? } ?>

Link to comment
https://forums.phpfreaks.com/topic/72425-keeping-space-between-two-lines/
Share on other sites

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.