indent..please help me to put 4 spaces before every line

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
btvngan
Forum Newbie
Posts: 3
Joined: Mon Dec 19, 2005 8:44 pm

indent..please help me to put 4 spaces before every line

Post by btvngan »

HawleyJR | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

 
Hello,

I don't know much about php but purchased a script.   I am trying to make my page looks a bit better.  I just want 4 spaces before every line in the middle column.  What do I need to put?  Here's the orginal middle column script without the indention.

Code: Select all

==============================================================

<!-- middle column - start -->
		
<td width=400 cellpadding=0 valign="top">

<p> <img src="images/icons/icon_index.gif" width="32" height="32" border=0 alt="index" align="absmiddle"> 
				<?php echo BENEFIT;?>.
			</p>

			<?php //include_once(IMAGE_MAP_NAME); // show image map ?>

			<br>

			<?php include_once("searchDefault.php"); // show default search tool/s ?>





			<br><br>
			<div style="font-size:10px;">
				<a href="search.php"> Advanced database search</a>
				<?php include_once( INSTALL_DIR . "search_top_ten.php");?>
			</div>
  
			
		</td>
		<!-- middle column - end -->	


==============================================================
Thanks !
btvngan

HawleyJR | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
User avatar
shoebappa
Forum Contributor
Posts: 158
Joined: Mon Jul 11, 2005 9:14 pm
Location: Norfolk, VA

Post by shoebappa »

Code: Select all

============================================================== 

<!-- middle column - start --> 
       
<td width=400 cellpadding=0 valign="top"> 

<p>&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/icons/icon_index.gif" width="32" height="32" border=0 alt="index" align="absmiddle"> 
            <?php echo BENEFIT;?>. 
         </p> 

         <?php //include_once(IMAGE_MAP_NAME); // show image map ?> 

         <br> 

         <?php include_once("searchDefault.php"); // show default search tool/s ?> 





         <br><br> 
         <div style="font-size:10px;"> 
            <a href="search.php"> Advanced database search</a> 
            <?php include_once( INSTALL_DIR . "search_top_ten.php");?> 
         </div> 
  
          
      </td> 
      <!-- middle column - end -->    


==============================================================
&nbsp; stands for non-breaking space. If you're trying to be XHTML compliant you might use   but I don't know if it's required.

Unless the output you mean is included in the: search_top_ten.php, then you'd have to find where to put the spaces there.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

It would probably be far more sensible and effective to use CSS padding ;)
User avatar
btvngan
Forum Newbie
Posts: 3
Joined: Mon Dec 19, 2005 8:44 pm

Thank you!

Post by btvngan »

Thank you all for your help. I tried both and modifying css seemed to work better. Again, thank you! :lol: :D :wink:
Post Reply