How to display new line??? PLease help me

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
ginogeorgep
Forum Newbie
Posts: 7
Joined: Tue Aug 19, 2008 12:10 pm

How to display new line??? PLease help me

Post by ginogeorgep »

This is my code

echo "$value1";
echo "$value2";

I have to display value2 in new line.I have tried \n but it is not working.Please help me..I am new to php.
User avatar
susrisha
Forum Contributor
Posts: 439
Joined: Thu Aug 07, 2008 11:43 pm
Location: Hyderabad India

Re: How to display new line??? PLease help me

Post by susrisha »

\n is used if the access is done through command line.
If you are trying to view the same on a browser , you should use <br /> tag for that

Code: Select all

 
echo "$value1 <br />";
echo "$value2 <br />";
 
ginogeorgep
Forum Newbie
Posts: 7
Joined: Tue Aug 19, 2008 12:10 pm

Re: How to display new line??? PLease help me

Post by ginogeorgep »

Hi Susrisha,

Great 8O 8O It is working now..Thnak a lot for your replay..PLease let me know how i can use "marquee" with echo "$value1 <br />";

Is it possible? I need to scroll up my text.

Thanks In advance :oops:
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: How to display new line??? PLease help me

Post by Mark Baker »

I suggest that you read up a few tutorials on writing HTML before you try PHP

http://www.w3schools.com/html/DEFAULT.asp
ginogeorgep
Forum Newbie
Posts: 7
Joined: Tue Aug 19, 2008 12:10 pm

Re: How to display new line??? PLease help me

Post by ginogeorgep »

Hello Mark Baker,

I know html a bit , What I need is I have a data from mysql.I could display the data in my page but i wish to give some actions like moving up or moving down this datas.Whether i need to use java script for this or i can do it by using marquee?
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: How to display new line??? PLease help me

Post by Mark Baker »

Code: Select all

 
echo '<MARQUEE>';
echo $value1;
echo '</MARQUEE>';
 
ginogeorgep
Forum Newbie
Posts: 7
Joined: Tue Aug 19, 2008 12:10 pm

Re: How to display new line??? PLease help me

Post by ginogeorgep »

Thanks Mark Baker ..It is working now.. :oops:
ginogeorgep
Forum Newbie
Posts: 7
Joined: Tue Aug 19, 2008 12:10 pm

Re: How to display new line??? PLease help me

Post by ginogeorgep »

Today i have completed the works on my site..Now it is working nicely.It is my personal website, Now I am about to find new ideas for the development of my site. If any one have any ideas for improving personal sites please inform me..At present my site contains albums,videos, allows vistors to write testmonials,.
Post Reply