Quote:
Originally Posted by mkx
sorry im still a bit confused, tried this with no luck =
<?php
$x = str_replace(array("\r\n","\r"),"",$x);
$x = strip_tags($hi->hello);
print $x ?>
|
Why would that work? What is $x? And what tags are you stripping? Try this:
Code:
<?php
$hi->hello = "hello how
are you";
$one_line = trim(preg_replace('/\s+/', ' ', $hi->hello));
print $one_line;
?>