Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Programming Help > PHP Programming Help

PHP Programming Help Post any question relating to PHP Programming here and hopefully someone can help.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2003-09-27, 04:50 PM
Junior Member
 
Join Date: Sep 2003
Posts: 2
reload
Default

this is too simple I have a variable $mycontent and inside of that it has a value of word separetd with enterkey (or Break Line) here is the detail of the value

------------------------------------------------------
$macontent (look down for the content of the variable)
IT SO GOOOD TO BE TRUE
NICE AND PERFECT DAY
THE ONE WHO WILL LEAD US IS YOU
ONE DAY, ONE NIGHT
IT IS A SIMPLE DAY
------------------------------------------------

I want this variable to be form as a single line and remove the break lines, can someone help me on how to manage this problem, do I have to use replace or it should be an array or what? thanks for the help
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2003-09-29, 10:13 AM
Junior Member
 
Join Date: Apr 2003
Posts: 11
naholyr
Default

why not $mycontent = strtr($mycontent, "\r\n", " "); ?
__________________
-- [AutoPhpDoc] --
Reply With Quote
  #3 (permalink)  
Old 2003-09-29, 10:36 AM
Junior Member
 
Join Date: Sep 2003
Posts: 2
reload
Default

thanks, I'll try that
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:46 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.