whynot Posted February 20, 2012 Share Posted February 20, 2012 for print html : What's Better, Faster and Optimized ?!? echo "<tr height=\"22\"> <form action = \"{$URL}/admin/edit.php\" method=\"POST\"> <input type=\"hidden\" name=\"login\"> <td width=\"15%\" bgcolor=\"$bgcolor\"> <input type = \"text\" name = \"login\" value=" . $f['login'] . "></td> <td width=\"15%\" bgcolor=\"$bgcolor\"> <input type = \"password\" name = \"password\" value=" . $f['pass'] . "> </td> </form> </tr>"; With PHP Method 2 : ( single ) echo ' <tr><form action = "' . URL . '/admin/editadmins.php" method="POST"> '; echo ' <td align="left" valign="top"><input type = "text" name = "login" value = "' . $f['login'] . '"></td>'; echo ' <td align="left" valign="top"><input type = "password" name = "password" value = "' . $f['pass'] . '"></td></form></tr>'; Method 3 : (With Html And Php echo ) <tr height="22"> <form action = "../admin/editadmins.php" method="POST"> <td align="left" valign="top"><input type = "text" name = "login" value = "<?PHP echo $f['login']; ?>"></td> <td align="left" valign="top"><input type = "text" name = "password" value = "<?PHP echo $f['pass']; ?>"></td> </form> <tr> Thanks. Quote Link to comment Share on other sites More sharing options...
Rifts Posted February 20, 2012 Share Posted February 20, 2012 single are faster but it honestly doesn't matter you are not coding on such a large magnitude where you will ever notice a difference. Quote Link to comment Share on other sites More sharing options...
Psycho Posted February 20, 2012 Share Posted February 20, 2012 There have been several discussions on this (on this forum and other). There are also other methods that you did not include: heredoc and nowdoc methods. All of them are valid methods for creating output. The bottom line is that the performance difference of either method is so negligible that it shouldn't be a consideration for the method you use. The main thing is to find a process that works and be consistent. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.