Question: Can i do something like php macro in html page, for example:

```
<html>
<head>        
</head>    
<body>

<?php if(Block1()):?>              
<div>
some html code
</div>
<?php endif;?>

</body>
</html>

```

Can i change this code:

```
<?php if(Block1()):?>              
<div>
some html code
</div>
<?php endif;?>

```

with some macro like,

```
#startBlock1
<div>
some html code
</div>
#endBlock1

```

Answer: 
If you mean macro, which will be executed after page will be loaded in browser - No, you can't php scripts are executed on server side.
You could read the `html` file into a `string` see: [php.net](http://php.net) `file_get_contents()` and then replace some patterns or keywords with some other text see: [php.net](http://www.php.net) `str_replace(), preg_replace()` if you want to run a function you could seek for the presence of a string / keyword see [php.net](http://www.php.net) `strpos(), preg_match()`