Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #10694

Re: PHP wirdwrap()

From Fiver <numeralfive@gmail.com>
Newsgroups comp.lang.php
Subject Re: PHP wirdwrap()
Date 2013-09-01 19:48 +0200
Organization A noiseless patient Spider
Message-ID <kvvukv$oa7$1@dont-email.me> (permalink)
References <kvvq3p$eac$1@speranza.aioe.org>

Show all headers | View raw


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>");
> </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>?

> 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/

regards,
5er

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

PHP wirdwrap() Twayne <nobody@spamcop.net> - 2013-09-01 12:30 -0400
  Re: PHP wirdwrap() Fiver <numeralfive@gmail.com> - 2013-09-01 19:48 +0200
    Re: PHP wirdwrap() Twayne <nobody@spamcop.net> - 2013-09-02 12:33 -0400

csiph-web