| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| New Member | javascript problem: undefined variable hey guys, ive recently been playing around with javascript, and have had no problems, until now. it is quite a wierd problem. for example, when i define a variable: Code: var quoteuser_24=new Array() quoteuser_24[0]='[something]example .......[/something]' Code: var quoteuser_24=new Array() quoteuser_24[0]='[example]<? ?> [/quote]' Help apreciated! |
| |
| | #3 (permalink) |
| New Member | right, i wasn't sure that when inserting text into a value, \n would insert as a new line. thanks but theres the problem that i am getting the variable from MySQL in PHP. and when there are line breaks in the database, how would you convert them into "\n" i tried using $subject = str_replace("\n","<br>",$subject); however, the linebreaks still apear on the variable. not really sure what to do. oh. i sorted the problem out, silly mistake =\ thanks for the help! |
| |
| | #4 (permalink) |
| NamePros Regular | you could also use the nl2br fucntion
__________________ Live Support : Zubair11 [at] hotmail.com Free SEO Directory! || Free Games and Songs || eBloggy.net Zubair.info || Mixcat Interactive |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| read ms access database and store in javascript variable | Niko2005 | Web Design Discussion | 0 | 05-25-2005 04:40 PM |
| read ms access database, store value in javascript variable | Niko2005 | Programming | 0 | 05-15-2005 08:37 PM |
| Javascript novice with small problem... | martyn187 | Programming | 2 | 05-04-2004 06:22 AM |
| Javascript: W3C Problem? | Mp)Tarh | Programming | 2 | 11-16-2003 04:26 AM |
| JavaScript Popup Problem | successgold | Programming | 1 | 09-20-2003 03:01 PM |