How can a select box value be passed to a PHP print statement?

To pass a select box value to a PHP print statement, you can use a form with a select element and submit button. When the form is submitted, the selected value can be accessed in PHP using the $_POST superglobal. You can then use this value in a print statement to display it on the page.

<form method="post">
    <select name="select_box">
        <option value="option1">Option 1</option>
        <option value="option2">Option 2</option>
        <option value="option3">Option 3</option>
    </select>
    <input type="submit" value="Submit">
</form>

<?php
if(isset($_POST['select_box'])){
    $selected_value = $_POST['select_box'];
    echo "Selected value: " . $selected_value;
}
?>