Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3982474
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:31:55+00:00 2026-05-20T05:31:55+00:00

hello i got the same problem as php :: new line in textarea? or

  • 0

hello i got the same problem as

php :: new line in textarea?

or heres the error. ( no newlines )

enter image description here

but it seems its not answered well in the above link.

the var_dump($post['content']); shows me

or something like

<pre dir="ltr" class="xdebug-var-dump"><small>string</small> <font color="#cc0000">'Duis libero sapien, cursus id tempus a, sollicitudin at urna. Maecenas elementum molestie massa quis pharetra. Donec eu libero ipsum. Aenean laoreet, tellus at pretium porta, nisl massa sodales massa, non laoreet sapien velit a neque. Praesent eleifend urna et diam sollicitudin eget pretium quam viverra. Sed rutrum enim quis lectus volutpat eleifend.





Nam in augue at diam tempus feugiat ac eu orci. Morbi pellentesque consequat lacinia. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesqu'...</font> <i>(length=634)</i></pre>

or

enter image description here

heres how i out put it.

<textarea name="content" cols="100" rows="50"><?php echo $post['content']; ?></textarea>

heres what it should look like

enter image description here

thanks for looking in.

Adam Ramadhan

edit

i am very sorry for the problem. the problem is yes im compressing each output from the views,

heres the function

public function compressor( $buffer )
{
    $search = array(
        '/(\s)+/s', // shorten multiple whitespace sequences <- THE MAIN PROBLEM
        '/<!--(.|\s)*?-->/', //strip html comments
        '/\>[^\S ]+/s', //strip whitespaces after tags, except space
        '/[^\S ]+\</s', //strip whitespaces before tags, except space
    );
    $replace = array(
        '\\1',
        '',
        '>',
        '<'
    );

    $buffer = preg_replace($search, $replace, $buffer); 
    return $buffer;
}

heres how i output my views

protected function view($view, $data = NULL)
{
    require_once 'libraries/core.views.php';
    $views = new Views;
    if ( config('compress') ) {

        /* See @ref #1 
        we are useing compressor just becouse ob_gzhandler dont support UTF-8 at the
        header, see http://php.net/manual/en/function.ob-start.php#91963
        */
        ob_start(array($this,'compressor'));
        # ob_start("ob_gzhandler");
    }

    #renders the data into view vars
    if (isset($data)) {
        foreach ( $data as $name => $val ) {
            $$name = $val;
        }
    }

    #require 'libraries/language/'. config('language') .'.php';
    $path = "application". DS ."views". DS . $view .".php";
    require $path;
    return TRUE;

    if ( config('compress') ) {
        while (ob_get_level() > 0) {
            ob_end_flush();
        }
    }   
}

again sorry, and thanks !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:31:55+00:00Added an answer on May 20, 2026 at 5:31 am

    the answer is very simple.

    There is some your code that strips out additional newlines.
    You have to investigate your code, spot the problem line and get rid of it.
    Not a big deal

    As a quick check you may try to print $_POST['content'], most likely it contains original value

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello got the error in following code.. The method RefeshDataGridView() is static.I run it
Hello stackoverflow people! I've got a problem which I haven't been able to solve
I got this code in my submit form <form id=myform action='hello.php' method='GET'> <input type=button
I am new to android. I got one issue during run my first hello
$(.menu-container).animate({top:25px}); $(.menu-container).animate({top:-900px}); $(.windows-container).animate({top:-730px}); hello sir.. i got a problem on queue in jquery.. what
Hello i got a problem using Apache-Tomcat v6.0.29. The Problem My application uses apache
I also got this same problem from last day. i tried 2-3 time to
Hello Android developers, I've got a problem with the Android SearchView widget. What I'm
I got the problem of not to find any page and category in wordpress.
Hello I've got a problem accessing Oracle DB from our datacenter through a tunnel.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.