Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 01-18-2003, 06:42 PM   #16 (permalink)
trevor
Code Monkey
 
Join Date: Jan 2003
Location: Canada
Posts: 91
trevor is on a distinguished road
i'll play with that later.

quick question though (last one)

how do you make a new line in php?

it is \n in c and <br> in html.

thanks
trevor is offline   Reply With Quote
Old 01-18-2003, 06:42 PM   #17 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
\n
sde is offline   Reply With Quote
Old 01-18-2003, 06:44 PM   #18 (permalink)
Ilya020
Techno Rat
 
Ilya020's Avatar
 
Join Date: Jan 2003
Location: San Diego
Posts: 559
Ilya020 is on a distinguished road
Send a message via AIM to Ilya020
\n but you can do <BR> as well...

Ilya
__________________
> SELECT * FROM users WHERE clue > 0
0 rows returned
Ilya020 is offline   Reply With Quote
Old 01-18-2003, 06:45 PM   #19 (permalink)
trevor
Code Monkey
 
Join Date: Jan 2003
Location: Canada
Posts: 91
trevor is on a distinguished road
**** nothing works for me!
not even \n.

meh i'll just do it the hard way:

<?
print("la la la");
?>
<br>
<?
print("la la la");
?>
trevor is offline   Reply With Quote
Old 01-18-2003, 06:45 PM   #20 (permalink)
anon
Guest
 
Posts: n/a
Quote:
Originally posted by trevor
**** nothing works for me!
not even \n.

meh i'll just do it the hard way:

<?
print("la la la");
?>
<br>
<?
print("la la la");
?>
<?
print("la la la <br />");
?>

  Reply With Quote
Old 01-18-2003, 06:46 PM   #21 (permalink)
Ilya020
Techno Rat
 
Ilya020's Avatar
 
Join Date: Jan 2003
Location: San Diego
Posts: 559
Ilya020 is on a distinguished road
Send a message via AIM to Ilya020
you can do print "blah<BR>";

Ilya
__________________
> SELECT * FROM users WHERE clue > 0
0 rows returned
Ilya020 is offline   Reply With Quote
Old 01-18-2003, 06:47 PM   #22 (permalink)
Ilya020
Techno Rat
 
Ilya020's Avatar
 
Join Date: Jan 2003
Location: San Diego
Posts: 559
Ilya020 is on a distinguished road
Send a message via AIM to Ilya020
Quote:
Originally posted by Vlad902


<?
print("la la la <br />");
?>

we posted at the same time.

why <br /> ?

Ilya
__________________
> SELECT * FROM users WHERE clue > 0
0 rows returned
Ilya020 is offline   Reply With Quote
Old 01-18-2003, 06:47 PM   #23 (permalink)
anon
Guest
 
Posts: n/a
Quote:
Originally posted by ilya020


we posted at the same time.

why <br /> ?

Ilya
The latest XHTML standards compliancy.
  Reply With Quote
Old 01-18-2003, 06:49 PM   #24 (permalink)
Ilya020
Techno Rat
 
Ilya020's Avatar
 
Join Date: Jan 2003
Location: San Diego
Posts: 559
Ilya020 is on a distinguished road
Send a message via AIM to Ilya020
were talking PHP....


Ilya

edit: Glad to see you deleted the IDIOTIC cop post...
__________________
> SELECT * FROM users WHERE clue > 0
0 rows returned
Ilya020 is offline   Reply With Quote
Old 01-18-2003, 06:51 PM   #25 (permalink)
anon
Guest
 
Posts: n/a
Quote:
Originally posted by ilya020
were talking PHP....


Ilya
Doesn't matter, you're still gonna see it and good coding practices should be exercised at all times....
  Reply With Quote
Old 01-18-2003, 06:52 PM   #26 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
remember you are using php to print text. this text is going to be html.

\n will only display if you view source. \n is a regular line feed .. html does not recognize line feeds, however if you view source, you will notice that it does skip a line.

if you want your line break to show up in html, then it is <br>

i use line feeds to nicely format my html .. but if you want the line break to show up in html, then you must print a <br>.
sde is offline   Reply With Quote
Old 01-18-2003, 06:52 PM   #27 (permalink)
Ilya020
Techno Rat
 
Ilya020's Avatar
 
Join Date: Jan 2003
Location: San Diego
Posts: 559
Ilya020 is on a distinguished road
Send a message via AIM to Ilya020
<br /> is...wierd....

at least now I know to use it.

Ilya
__________________
> SELECT * FROM users WHERE clue > 0
0 rows returned
Ilya020 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Design Problem elusionsdesign HTML, XML, Javascript, AJAX 2 11-09-2003 07:01 PM
Help debugging a power problem Belisarius Lounge 0 10-25-2003 04:44 PM
structure problem Goshi Standard C, C++ 5 04-21-2003 12:19 AM
This is a windows/C problem UnderWing Standard C, C++ 6 03-28-2003 06:17 AM
PHP / JS problem bdl HTML, XML, Javascript, AJAX 2 03-13-2003 08:53 AM


All times are GMT -8. The time now is 01:23 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting