|
@Byran M. I tend to use two constructs I don often see other WordPress developers using often, which surprises me, but I like them a lot. 1.) HeredocsYou can store large blocks of text as heredocs string that might look like this so I can store worrying about mixing single and double quotes:
Note that the variables might be passed to a function as an array and then What's more, although it mayt be relevant to you is if I use heredoc names like HTML, SQL, etc. then my IDE PhpStorm does syntax injection and will give me autocomplete and syntax coloring within the heredoc. 2.) String Concatenation using an Array
The other idiom I like to use is to collect the content into an array and then HTML; $html[] = ' '; return implode("\n",$html); } |
| More Solution |
|---|