aproblem Posted September 12, 2009 Share Posted September 12, 2009 Hi guys. First of all I dont have any knowledge of PHP. Thats why I came here to ask if someone is able to solve my problem. Im from Finland and Im running my own classifieds site(http://www.ilmoitukset.org). The script Im using is Almond Classifieds Free. But the problem is that when you write a description(brief) in ad for example this: AAAA BBBBB AAAA It will appear like this AAAA BBBBB AAAA I have located the problem somewhere in between getting the information from MySQL and printing it to the site. I was looking the MySQL database with PHPMyAdmin and there the brief field was like this AAAA BBBBB AAAA Any php pro willing to help me? The script that Im using is available here http://www.almondsoft.com/loadfree.html Quote Link to comment Share on other sites More sharing options...
HektoR Posted September 12, 2009 Share Posted September 12, 2009 Hi.. Thats not big problem try to use http://php.net/nl2br echo nl2br($your_variable); I hope this help you. Good Luck Quote Link to comment Share on other sites More sharing options...
aproblem Posted September 12, 2009 Author Share Posted September 12, 2009 Yes but I have never studied PHP. I dont have any clue where that should be placed in the code and I fear that getting that knowledge whould take me months. The PHP is totally gipperish to me. Quote Link to comment Share on other sites More sharing options...
HektoR Posted September 12, 2009 Share Posted September 12, 2009 Don't worry... Place this code where you gettigng these "AAA BBB CCC" and change $your_variable with yours, which contains that "AAA BBB CCC" Quote Link to comment Share on other sites More sharing options...
cbolson Posted September 12, 2009 Share Posted September 12, 2009 Hi, I suspect that, as the user states that they have no idea about php, the problem is finding that bit of code to know where to add the code that you suggest. I have downloaded the script that you mention and I think have I have been able to identify the line that is showing the advert description. You need to open the file details.php and go to line 206 (assuming that it hasn't been modified) You should see this: ".$row[$key]." </td></tr> Following HektoR's advice, you need to modify this line so that it looks like this: ".nl2br($row[$key])." </td></tr> I hope this helps, bear in mond that I have never seen or used this code before so I might have got the wrong place Chris Quote Link to comment Share on other sites More sharing options...
aproblem Posted September 12, 2009 Author Share Posted September 12, 2009 The code didnt work but I'd like to thank you cbolson for having so much trouble for me. Thank you very much! I found a way to get around the problem. Apperently the field "brief" was not mentioned to write the long answers. When I started modifying the script I deleted "moredetails" field because I thought its useless since there was the field "brief". Well apparently the field "moredetails" had the property to do this AAA AAA But thanks again for helping me! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.