How would I go about forcing national letters such as the Danish Æ, Ø and Å letters, in an OOP structure, where the individual .php documents that are concerned with the query and the output, are not under the charset of the HTML doc?
To be more specific I have an index.php file with the following div:
<div id="box_tekst"></div>
I then have the page.js document concerned with handling the asynchronized requests
page.content = function(id) {
$.ajax({
url: 'core/page.php',
type: 'POST',
data: { method: 'content', id: id },
success: function(data) {
$('#box_tekst').html(data);
}
});
}
Finally I have the page.php file refered to in the .js document which serves the query in the following maner:
$id = $_POST['id'];
$page = new Page();
$content = $page->getPage($id);
if(!empty($content)) {
foreach($content as $input) {
?>
<h1><?= ucfirst($input['title']) ?></h1>
<p><?= nl2br(ucfirst($input['pg'])) ?></p>
<?
}
}