So I want to show a query on a webpage and I am using PHP to do it. Here is my full PHP code for the query:

```
<?php
$query = 'SELECT p.name, p.club, f.link, ROUND(2016-p.birthyear, 0) AS "age", p.position
FROM pplayers p, pflags f
WHERE p.country = f.country AND p.club = '1. FC Köln'
ORDER BY name';
$result = pg_query($query) or die('Query failed: ' . pg_last_error());
while ($x = pg_fetch_object($result)) {
echo "<tr> <td> $x->name <td> $x->club <td> $x->link <td> $x->age <td> $x->position <td> \n";
}
pg_free_result($result);
pg_close($dbconn);
?>

```

The query (the part inside the apostrophes) works 100% fine in SQL and it works 100% fine on the webpage without "p.club = '1. FC Köln'". I think the problem is that the query is in apostrophes ('), so the fact that I use apostrophes for '1. FC Köln' destroys the query.

How can I fix this?

Big thanks in advance!!