ginerjm Posted May 13, 2017 Share Posted May 13, 2017 (edited) Use php tags: foreach($myarray as $k=>$v) { echo "<label>My inputs</label>"; echo "<tr><td>$k</td><td$v</td></tr>"; } Use code tags: foreach($myarray as $k=>$v) { echo "<label>My inputs</label>"; echo "<tr><td>$k</td><td$v</td></tr>"; } So using code tags drops the double spacing but neither one respects the indents in my code. Edited May 13, 2017 by ginerjm Quote Link to comment https://forums.phpfreaks.com/topic/303932-whats-the-secret-of-pasting-code-into-the-forum/ Share on other sites More sharing options...
cyberRobot Posted May 15, 2017 Share Posted May 15, 2017 @ginerjm - So I moved your test post and modified the title. To indent the code, do you use tabs? I usually need to change the tabs in my code to spaces. Quote Link to comment https://forums.phpfreaks.com/topic/303932-whats-the-secret-of-pasting-code-into-the-forum/#findComment-1546531 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.