Display variable with spaces

From: Date: Wed, 13 Aug 2003 15:56:43 +0000
Subject: Display variable with spaces
Groups: php.general 
Request: Send a blank email to php-general+get-159451@lists.php.net to get a copy of this message
Hello, I am trying to display the rows of a MySql Query in a table. I retrieve the result using the query : while ($row = mysql_fetch_array($result1, MYSQL_ASSOC)) {
			         	$email_1	         =  $row["email_1"];
                            }
And I try to display it in the table using this : <input name="email_1" type="text" id="email_1" size="50" value = <? echo "$email_1"; ?>> if I try to echo the variable $email_1, I get the correct value i.e. "thisisa long e-mail address" /// However when it comes to displaying it using the table all I get is the "thisisa" . It simply avoids the spaces. Can anyone tell me why this is happening..?? I am sure it is something pretty minor .... but I just cant seem to get it right. Thanks in advance, -Pushpinder

« previous php.general (#159451) next »