ID: 40607 Updated by: [EMAIL PROTECTED] Reported By: Joe at sofusion dot com -Status: Closed +Status: Bogus Bug Type: MSSQL related Operating System: FREE BSD 6.0 PHP Version: 5.2.1
Previous Comments: ------------------------------------------------------------------------ [2007-02-23 21:01:54] Joe at sofusion dot com Thanks!! ------------------------------------------------------------------------ [2007-02-23 20:40:48] [EMAIL PROTECTED] This is a normal browser feature. The browser will reduce the whitespace (spaces, tabs new lines etc) to a single space. You could replace each space with if you want to force two spaces. ------------------------------------------------------------------------ [2007-02-23 20:16:24] Joe at sofusion dot com When I use the <pre></pre> tags, It does display the correct data. Is this telling me that it is HTML that is concatinating the 2 spaces into one? Also you can use: $Name = str_replace (' ', ':', $RT['Name']); echo ' <p>Name2 = '.$Name . '</p>'; to see the 2 spaces. When you duplicate the bug, do you have 2 spaces between the words in your browser? Thanks!! ------------------------------------------------------------------------ [2007-02-23 19:29:07] [EMAIL PROTECTED] I'm unable to reproduce this (on Linux and WIndows with FreeTDS). Try viewing the result outside the browser, use <pre></pre> or get the length of the column to verify that you are getting the right results. ------------------------------------------------------------------------ [2007-02-23 16:18:14] Joe at sofusion dot com Sorry, dont use # in TBL Name. USE THIS DB CODE AND PHP CODE TO TEST: CREATE TABLE T1( Name varchar(255), Number int ) INSERT INTO T1 VALUES('Two Spaces',1) INSERT INTO T1 VALUES('One Spaces',2) $sql = "SELECT Name FROM T1 WHERE Number = '1'"; $rs = mssql_query($sql); while ($RT = mssql_fetch_array($rs)) {$Name= $RT['Name']; //This should have 2 spaces in it like the DB //But it only has one echo ' <p>Name = '.$Name . '</p>'; } ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/40607 -- Edit this bug report at http://bugs.php.net/?id=40607&edit=1