PHP - Mysql在一个变量中放一个$ row [],在第一个空格后剪切文本

new in PHP my question can be very easy for you :)

example of the issue:

<?php 
if(isset($_GET['edit'])) { 
$res_hed = $mysqli->query("select VAT FROM CUSTOMERS WHERE id=$_GET[edit]");

for ($row_no = $res_hed->num_rows - 1; $row_no >= 0; $row_no--) {
$VAT = $row['VAT'];
                    }
echo "
<form class='col-md-3' method='GET'>
<h3>Edit VAT</h3>
<div class='form-group'>
<label>VAT</label>
<input class='form-control' type='text' name='VAT' value=$VAT>
</div>
?>      
}

Data in table for field VAT = 'GB1122 155 4555' When the value is set in the variable $VAT i get only 'GB1122'

Thanks in advance for your help !

Your value attribute should be in quotes

<input class='form-control' type='text' name='VAT' value='$VAT'>

You may also be missing the end " off the text...

</div>";