Re: [PHP] Formatting Question
Thanks to everyone for their suggestions, I used the nl2br function in the end, and it works perfectly. On 02/10/06, Richard Lynch [EMAIL PROTECTED] wrote: On Mon, October 2, 2006 4:13 pm, tedd wrote: Why not use nl2br() to show the data in the browser and leave the data as-is in the dB? Apparently I typed too much, cuz that's exactly what I said, or meant to say... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- http://www.borninblood.co.uk
[PHP] Formatting Question
Sorry to plague you with a question that should have a simple answer, but I can't find said answer anywhere (probably looking for the wrong things in the wrong places!) Basically I want to allow a user to input a string via a form into a database, I have the code to do that and it works almost 100% - I have made it so that any html tags are stripping off the string before saving it, but I do want to allow some basic formatting - namely when a user takes a new line in the textbox, I want the new line to carry over to the database. At the moment the user could type in something like this... wibble wobble But after it has been submitted and then retrieved from the database it will return wibblewobble. Any ideas? Regards Toby -- http://www.borninblood.co.uk
[PHP] Stop - Blog Time
I don't want to spam a new blog I have created, so I won't post a link to it, but I was thinking about every so often talking about PHP and its many uses - to that end, if anyone has anything they want to blog, but couldn't be bothered actually making a blog, please email me - naturally you will get full credit for the article etc. etc.
[PHP] readdir
I have been writing some code that visits each directory stored within one directory in turn, pics a random image from it and displays that image. I have the code working fine, apart from one small quirk that I can't really understand. In one version of the implementation, the directories appear to be getting accessed in the order they are uploaded to / edited on the server starting with the most recent upload/change - which is handy because it is what I wanted. But in another slightly different version of the same bit of code, it lists them in some weird order that I can't fathom. I suppose my question put simply is, what is the default ordering of directories when PHP uses the readdir method? And is there anyway to force a specific ordering to the directories before PHP searches down them? Any help would be greatly appreciated. Regards, Toby