Managing "Jobs" data in a database
I see you want to apply Separation of Concerns by separating business logic from the View's.
The database::listAllVacatures() method should return the $vacatures array. This way you can move the foreach() (which prepares the HTML output) from inside the method into the template like so:
&lt;div class=&quot;container&quot;&gt;
    &lt;p&gt;&lt;h3&gt;Vacatures:&lt;/h3&gt;&lt;/p&gt;
&lt;?php foreach ($db-&gt;listAllVacatures() as $vacature): ?&gt;
    &lt;p&gt;
        &lt;a href=&quot;vacature.php?id=&lt;?= $vacature[0] ?&gt;&quot;&gt;&lt;?= $vacature[1] ?&gt;&lt;/a&gt;
        - &lt;a href=&quot;delete.php?id&lt;?= $vacature[0] ?&gt;&quot;&gt;delete&lt;/a&gt;
        - &lt;a href=&quot;#&quot;&gt;Edit&lt;/a&gt;
    &lt;/p&gt;
&lt;?php endforeach; ?&gt;
&lt;/div&gt;


Additional Information

It would be best to follow a naming convention that uses one language. It only makes everything harder to understand when you have to read code that is written in multiple languages (like English and Dutch). I'd say stick to the same language of the programming language you're using. So listAllVacatures() method would now actually be renamed something like findAllJobs().

Your database class isn't actually what the name implies it to be. It's actually a class which responsibility is (or should be) to retrieve all job data from the database. You might wanna call it JobFetcher or something like that (note the CamelCase naming convention for classes in PHP).

I see that you're instantiating your database class like $db = new database();. No dependencies are injected. In the database::listAllVacatures() you use $this-&gt;db to communicate with the database. Which means you have your database class tightly coupled with PDO.
What if you need to update the credentials to connect to the database? You will have to change your class, which is a bad thing. I recommend you to utilize Dependency Injection to get rid of this problem, so you can inject the PDO instance the class needs to operate. It introduces many benefits.



Since you showed interest in wanting to separate your concerns I would advise you to take a look at the MVC pattern that does just what you want: It separates business logic from the View's.
Also try to adhere to the widely known coding standards defined by the PHP Framework Interop Group. It improves the code's readability, especially to other programmers who follow these standards as well. Of course, you do not have to be perfect with it.