[Show all top banners]

ma_ko_hoo
Replies to this thread:

More by ma_ko_hoo
What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 can any one help me in mysql-php
[VIEWED 2916 TIMES]
SAVE! for ease of future access.
Posted on 12-14-06 4:18 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

i displayed a few paragraph in my web page which was stored in the mysql table as a blob, but it was not displayed as a paragraph ( with no enter, in single line). Can some one help me if there is an extra code needed to display it correctly.

EX:
this is first para
this is second para
this is third para

above is the stored blob type content

when it is displayed it shows like
this is first para this is second para this is third para

Now i need to correct this, can any one have any idea.
 
Posted on 12-14-06 11:10 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

did you store it as html?? or just plain text?
 
Posted on 12-14-06 11:12 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

if you saved it as plain text, in html, try displaying the blob inside the
 
tags.

normally, its better to save it as html
 
Posted on 12-14-06 11:23 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

ma_ko_hoo bro use nl2br function...like this

echo nl2br(mysql_field_name)..
 
Posted on 12-14-06 12:10 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

another way.....

use
echo ereg_replace("\n","
", mysql_field_name);

which will replaces all newline charecters (\n) to html tag.
 
Posted on 12-14-06 12:12 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

sorry, line break tag did not show up in above post

echo ereg_replace("\n","<br>", mysql_field_name);
 
Posted on 12-14-06 11:09 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Thanks buddies, I will try as suggested.
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 60 days
Recommended Popular Threads Controvertial Threads
What are your first memories of when Nepal Television Began?
निगुरो थाहा छ ??
Basnet or Basnyat ??
Sajha has turned into MAGATs nest
TPS Re-registration case still pending ..
मन भित्र को पत्रै पत्र!
काेराेना सङ्क्रमणबाट बच्न Immunity बढाउन के के खाने ?How to increase immunity against COVID - 19?
TPS Work Permit/How long your took?
Breathe in. Breathe out.
Guess how many vaccines a one year old baby is given
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
चितवनको होस्टलमा १३ वर्षीया शालिन पोखरेल झुण्डिएको अवस्था - बलात्कार पछि हत्याको शंका - होस्टेलहरु असुरक्षित
शीर्षक जे पनि हुन सक्छ।
Travelling to Nepal - TPS AP- PASSPORT
Nepali doctors future black or white usa ?
Doctors dying suddenly or unexpectedly since the rollout of COVID-19 vaccines
Morning dharahara
Another Song Playing In My Mind
TPS Renewal Reregistration
nrn citizenship
Nas and The Bokas: Coming to a Night Club near you
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters