im trying to echo an php code with mysqli inside an html eho : im trying to echo my php while loop inside a html echo
basically echo inside echo. can someone help me? is that possible?

here is my entire code:

    <?php
    
    session_start();
    require 'config.php';
    
    if (@$_SESSION['username']) {
    
    	$query = "SELECT * FROM `crew_info`";
    	$query_run = mysqli_query($conn,$query);
    
    	echo '<!DOCTYPE html>
    	<html>
    	<head>
    		<title>All Crew</title>
    	</head>
    	<body>
    
    		<table>
    			<tr>
    				<th>First Name: </th>
    				<th>Middle Name: </th>
    				<th>Last Name: </th>
    				<th>Age: </th>
    				<th>Birth Date: </th>
    				<th>Birth Place: </th>
    				<th>Gender: </th>
    				<th>Martial Status: </th>
    				<th>Nationality: </th>
    				<th>Email Address: </th>
    				<th>Address 1: </th>
    				<th>Address 2: </th>
    				<th>Course: </th>
    				<th>School Graduated: </th>
    				<th>Remarks: </th>
    				<th>Date Added: </th>
    				<th>Status: </th>
    			</tr>
    			<tr>
    			while($record = mysqli_fetch_assoc($query_run)) {
    			echo "<tr>";
    			echo "<th>".$record['first_name']."</th>";
    			echo "<th>".$record['middle_name']."</th>";
    			echo "<th>".$record['last_name']."</th>";
    			echo "<th>".$record['age']."</th>";
    			echo "<th>".$record['birth_date']."</th>";
    			echo "<th>".$record['birth_place']."</th>";
    			echo "<th>".$record['gender']."</th>";
    			echo "<th>".$record['martial_status']."</th>";
    			echo "<th>".$record['nationality']."</th>";
    			echo "<th>".$record['email_address']."</th>";
    			echo "<th>".$record['address_1']."</th>";
    			echo "<th>".$record['address_2']."</th>";
    			echo "<th>".$record['course']."</th>";
    			echo "<th>".$record['school_graduated']."</th>";
    			echo "<th>".$record['remarks']."</th>";
    			echo "<th>".$record['date_added']."</th>";
    			echo "<th>".$record['crew_status']."</th>";
    		echo "</tr><br>";
    			</tr>
    		</table>
    
    	</body>
    	</html>';
    
    
    
    
    	}
    
    }
    else {
    	header('Location: /practice1/index.php');
    }
    
    ?>

this is what my codes look like. i hope someone can help me