Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Code adds an indent when it shouldn't
Old 06-13-2007, 09:08 PM Code adds an indent when it shouldn't
Skilled Talker

Posts: 99
Trades: 0
Here is the code i am having trouble with:

Code:
        <td width='600' valign='Top' background=images/layout/menu_05.png>
            <table width=100% border=0 cellpadding=0 cellspacing=0 align='center'>
                <tr> 
                  <td background=images/layout/menu_04.png width=100% height=18 Valign=middle> 
                    <div align='center' width='598'><font face='Verdana, Arial, Helvetica, sans-serif' size='1'>
<marquee direction='left' scrollamount='3'><b><?php include('marquee.php'); echo $newsticker; ?></b></marquee>
                    </font></div>
                  </td>
                </tr>
            </table>
That code generates this..

Code:
         <td width='600' valign='Top' background=images/layout/menu_05.png>
            <table width=100% border=0 cellpadding=0 cellspacing=0 align='center'>
                <tr> 
                  <td background=images/layout/menu_04.png width=100% height=18 Valign=middle> 
                    <div align='center' width='598'><font face='Verdana, Arial, Helvetica, sans-serif' size='1'>
<marquee direction='left' scrollamount='3'><b>
Marquee is Here</b></marquee>
                    </font></div>
                  </td>
                </tr>
            </table>
After the first <b> it creates an indent which should not be there. Why is that?

Last edited by Arez20469; 06-13-2007 at 09:19 PM..
Arez20469 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-14-2007, 07:59 AM Re: Code adds an indent when it shouldn't
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
Trades: 1
you have a indent in the file you include marque.php

But why are you woried about that ... it shouldnt affect the browser output
__________________
If you like my posts ... TK is appreciated:)

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 06-14-2007, 08:13 AM Re: Code adds an indent when it shouldn't
Ultra Talker

Posts: 483
Trades: 0
Um... I assume you mean 'new line' rather than 'indent', but solomongaby is right: either the new line is coming straight from the PHP file (maybe you have a new line after the closing '?>' PHP tag or at least outside of the PHP tags?) OR it's being prepended to the newsticker variable. More than likely it's the former.

As solomongaby said, too, there's no real reason to worry about it, anyway.
__________________

Please login or register to view this content. Registration is FREE
TwistMyArm is offline
Reply With Quote
View Public Profile
 
Old 06-14-2007, 01:30 PM Re: Code adds an indent when it shouldn't
Skilled Talker

Posts: 99
Trades: 0
PHP Code:
<?php
$sql 
"SELECT * FROM status";
$query mysql_query($sql);
while(
$row mysql_fetch_array($query)) {
$newsticker $row['newsticker'];
}
?>
Could you tell me which part of that is making the new line??
Arez20469 is offline
Reply With Quote
View Public Profile
 
Old 06-14-2007, 01:34 PM Re: Code adds an indent when it shouldn't
Ultra Talker

Posts: 483
Trades: 0
Well, you have to tell us explicitly whether or not the new line at the end of the "?>" is in the file, or if it's there because you put it there when you copy-pasted.

See, that's what I meant when I told you: "maybe you have a new line after the closing '?>' PHP tag".
__________________

Please login or register to view this content. Registration is FREE
TwistMyArm is offline
Reply With Quote
View Public Profile
 
Old 06-14-2007, 06:09 PM Re: Code adds an indent when it shouldn't
Skilled Talker

Posts: 99
Trades: 0
thanks, that was it!!!! needed it all in one <?php ?>
Arez20469 is offline
Reply With Quote
View Public Profile
 
Old 06-14-2007, 08:57 PM Re: Code adds an indent when it shouldn't
Ultra Talker

Posts: 483
Trades: 0
Just to be absolutely clear: it doesn't all need to be on one line, you just have to make sure that there is no new line after ?>...
__________________

Please login or register to view this content. Registration is FREE
TwistMyArm is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Code adds an indent when it shouldn't
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.49262 seconds with 12 queries