RE: [PHP] ptting the variable inside the input

From: Date: Wed, 22 Aug 2007 15:40:05 +0000
Subject: RE: [PHP] ptting the variable inside the input
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-261118@lists.php.net to get a copy of this message
[snip] [snip] echo $title=$row['title']; echo "<tr><td><input name=\"title\" type=\"text\ value=\"$title\" /></td>"; [/snip] echo "<tr><td><input name=\"title\" type=\"text\ value=\"".$title."\" /></td>"; You have to concatenate the value $title into the string [/snip] Actually don't have to do that, it was just one of the things that I thought of right off the top of my head. What is the result of echo $title=$row['title']; ? Actually, that is bad form, why do the transfer? echo "<tr><td><input name=\"title\" type=\"text\ value=\"".$row['title']."\" /></td>"; If you must do the re-assignment; $title = $row['title']; echo $title;

« previous php.general (#261118) next »