jordangomm's Profile
Reputation: 6
Worker
- Group:
- Contributors
- Active Posts:
- 23 (0.02 per day)
- Joined:
- 12-January 10
- Profile Views:
- 1,712
- Last Active:
Dec 09 2012 10:19 AM- Currently:
- Offline
Previous Fields
- Country:
- ES
- OS Preference:
- Mac
- Favorite Browser:
- Chrome
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- PC
- Your Car:
- Ford
- Dream Kudos:
- 25
Latest Visitors
-
naveed_786 
26 Nov 2011 - 05:03 -
youngprolive 
09 Jan 2011 - 14:02 -
Vlad4000 
24 Sep 2010 - 19:22 -
shomazta 
23 May 2010 - 19:37
Posts I've Made
-
In Topic: getting value from database and printing with \n
Posted 9 Dec 2012
Atli, on 08 December 2012 - 02:49 PM, said:
jordangomm, on 08 December 2012 - 08:53 PM, said:When storing your information to the database, convert new lines to HTML line breaks using:
That's a bad idea. You don't taint the data by converting it to a specific output format before putting it into the database. You should store it in it's original form (or in some neutral form at least) and make whatever changes are required for it to fit your output when said output is being generated.
Well said, didn't think that one through, although my second solution (the edit) changes on output, and also formats it into a list as the OP wanted, so that's probably more suited. -
In Topic: getting value from database and printing with \n
Posted 8 Dec 2012
EDIT: Removed my first solution, as pointed out by Atli, it was a bad idea. Try the solution below.
Having further read your post I've noticed you wanted to display in a list, so you could also use this:
$item_query = mysql_query("SELECT * FROM item"); $row = mysql_fetch_assoc($item_query) $features_db = $row['features']; // Seperate the lines into array items using \n as the delimiter $features = explode("\n", $features_db); // Start the list echo "<ul>"; // Loop through the features in the array we created foreach ($features as $f) { // Output each feature as a list item echo "<li>".$f."</li>"; } // End the list echo "</ul>"; -
In Topic: Localhost Poblem
Posted 25 Nov 2011
It appears to be started in your first post? Seeing as the error is produced by Apache, but maybe that's just me being stupid.
Also, it appears your apache is trying to bind itself to 0.0.0.0:80... So first off check that nothing else is using port 80, and secondly, I'm not sure if I'm just being stupid again, but I'm pretty sure my Apache is bound to 127.0.0.1, not 0.0.0.0
Hope that helps
My Information
- Member Title:
- New D.I.C Head
- Age:
- 18 years old
- Birthday:
- March 2, 1995
- Gender:
-
- Interests:
-
* Web Development
* Cycling - Full Name:
- Jordan Gomm
- Years Programming:
- 5
- Programming Languages:
- PHP, XHTML, JavaScript, CSS, XML, VB.NET, jQuery
Contact Information
- E-mail:
- Click here to e-mail me
- Website URL:
-
http://www.runedesign.net
- Twitter:
- runedesign
Friends
jordangomm hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
jordangomm has no profile comments yet. Why not say hello?