mallard Posted December 19, 2008 Share Posted December 19, 2008 Can someone help me rewrite this little piece of code to make it cleaner? The code works the way it is now but my editor flags the PHP part as an undefined attribute name. <input name="time" type="text" id="time" size="5" <?php if($edit) print("value='$location'"); ?>> Thanks for any help! Link to comment https://forums.phpfreaks.com/topic/137660-solved-rewrite-help-for-undefined-attribute-name/ Share on other sites More sharing options...
mmarif4u Posted December 19, 2008 Share Posted December 19, 2008 <input name="time" type="text" id="time" size="5" value="<?php if($edit) {echo $location;}?>"> Link to comment https://forums.phpfreaks.com/topic/137660-solved-rewrite-help-for-undefined-attribute-name/#findComment-719485 Share on other sites More sharing options...
mallard Posted December 19, 2008 Author Share Posted December 19, 2008 Nice. Much tighter that way. Thanks! Link to comment https://forums.phpfreaks.com/topic/137660-solved-rewrite-help-for-undefined-attribute-name/#findComment-719497 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.