I've just started making my own WordPress widgets and don't have a very good understanding of good practices with PHP or HTML. To add html to a widget I have seen two different methods, the first being inside the PHP using
echo and the second being closing off the PHP with
?> , writing some HTML then reopening the PHP with a
For my widget I have found it much easier to use the second method but I am concerned about whether doing this is bad practice and could lead to problems later on. Is this something that just happens to work and wasn't intended to be used this way so could be broken in future updates?