> I work for a school where we need to put the class results on to our
web,
> one for every class. We enter the marks in the database and this
should be
> displayed in a particular varying format as follows(an example) :
> 
> Grade A Pass :
> 4554 7687 9834 2354 7671
> 
> Grade B Pass :
> 0045 7612 2297
> 
> Failed :
> 3104 6509 0286 8765 2229 0978
> 
> How can I put this in Mysql and get the same test formatting out? If
the
> grade types where standard and limited, it was okay. But the grades
types
> can increase or decrease. How can I maintain the same formatting as
what I
> input?

How are you getting it into the database? MySQL isn't going to change
the formatting of that text at all. Now, if you were to display it in an
HTML page, it won't look the same. HTML does not recognize newlines,
only <br> tags. Here is where the nl2br() function comes in handy, or
<pre> tags. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to