function wrapper_end() { echo '</div><div class="col-md-4"> тут должен php код </div></div></div>';} 

php code itself:

 <?php sidebar( 'widget-areas-1212' ); ?> 
  • one
    what exactly is the problem? why not just paste the code itself? echo '<p><?php foo(\'bar\'); ?></p>'; - Lexx918

2 answers 2

 function wrapper_end() { echo '</div><div class="col-md-4">'; sidebar('widget-areas-1212'); echo '</div></div></div>'; } 
     $var = sidebar('text'); function name($var){ echo "<div>" . $var . "</div>"; } name($var); 
    • The $var variable will not be available in the local area of ​​the function, without a forced prompt, through a prototype or via global — which is no longer recommended in principle. - And
    • @And, yes, blunted hard, did not notice. corrected. - dasauser