I see that in python, there is the bottle for example that does the same thing as what I intend to do then ...
I'm new to web practice, student indeed and would like to know if I can use php and html in the same place, wanted to know if this is a default, not recommended, or whatever. There is only Body because I intend to use Ajax and load the posts without refreshing the page.
Follow the example code:
<?php
function __autoload($class_name){
require_once $class_name . '.php';
}
?>
<body>
<?php
$noticia = new Noticia();
?>
<div id="posts">
<?php foreach ($noticia->findAll() as $value): ?>
<div style=" word-wrap: break-word; width: 400px; ">
<?php echo $value->mensagem; ?> <br><br><br><br>
</div>
<?php endforeach; ?>
</body>