FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » PHP wirdwrap()
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: PHP wirdwrap() [message #182745 is a reply to message #182740] Mon, 02 September 2013 16:33 Go to previous message
bill is currently offline  bill
Messages: 310
Registered: October 2010
Karma:
Senior Member
On 2013-09-01 1:48 PM, Fiver wrote:
> On 2013-09-01 18:30, Twayne wrote:
>> This code works first time, every time:
>>
>> <code>
>> $comments = $_POST["comments"];
>> echo $comments . "<br /><br />";
>> echo wordwrap($comments,40,"<br>"); <------ comma before the "<br>") instead of period! Dumb!!
>> </quote>
>>
>> but this code always fails to do anything to the variable: it remains
>> exactly as the raw data was:
>>
>> <code>
>> $comments = $_POST["comments"];
>> echo $comments . "<br /><br />";
>> $comments = wordwrap($comments,40,"<br>");
>> echo $comments . "<br /><br />";
>> </quote>
>
> You've made some error in your tests. Both will print the exact same thing.
>
> By the way:
> - <code></quote>?
> - <br /> or <br>?

I was pretty tired when I wrote that; didn't think I could screw up
anything so simple. I need to quit posting when I'm not feeling good;
and will in the future!
>
>> Also, at one time, I knew of a site where one could insert code snippets
>> of PHP and have them evaluated, but cannot locate it again; anyone
>> happen to know of one like that?
>
> http://sandbox.onlinephpfunctions.com/

Hmm, thanks! That might help a bunch.

Thanks for your patience,

Twayne`
>
> regards,
> 5er
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Android app Developers requirements
Next Topic: calling a value into another php script...
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 22:25:42 GMT 2024

Total time taken to generate the page: 0.06149 seconds