使用GLOBALS参数

Is it possible to do this? NOTE: I'm new to PHP

<?php     
    $result = mysqli_query($con,"SELECT naam FROM lowavolPloegen WHERE ploeg_id='4' ORDER BY voornaam, naam");
        while($row = mysqli_fetch_array($result)) {
            $ploegNaam = $row['naam'];
            echo $ploegNaam;
        }
?>

Here comes some html text

<?php
    echo GLOBALS['$ploegNaam'];
?>

The correct syntax is:

echo $GLOBALS['ploegNaam'];

You need $ before the name of the GLOBALS array to indicate that it's a variable name, and the key is just the name of the global variable without the $.