Why form fields are not filled?

Hello! A question: how do I make it so that I had single quotes instead of double in the HTML code in the value?
Here is the PHP code for this selector:
echo '<select name="wslist">';
 while($weblist = mysqli_fetch_array ($list)) { 
 echo "<option value="{$weblist[" name']}'>{$weblist['name']}</option>";
}
 echo '</select>';

Here is what I get in HTML:
<select name="wslist">
<option value="admin">admin</option>
<option value="ferrum.ru">ferrum.ru</option>
<option value="arg.ru">arg.ru</option>
<option value="arg.ru">arg.ru</option>
<option value="gogol.ru">gogol.ru</option>
</select>

Quotation marks in HTML output - single, and must be double.
July 2nd 19 at 17:02
3 answers
July 2nd 19 at 17:04
Solution
How send a form with a select wslist on the server? There just post?
From the above code it is not clear if this is all the code, the value wslist never sent to the server.
No way. What I gave is all the code. - Glennie_Beie commented on July 2nd 19 at 17:07
Need to display a selector at this stage to send data to the server - not necessarily. - Glennie_Beie commented on July 2nd 19 at 17:10
: only recently has the question text was completely different: you asked me why, if you directly set the value of the variable, then it works, but if you take the value from $_POST, no.
If there was all the code you need to send the value of the selected option of the select to the server via post, before you get it through the $_POST array. - Destiney.Kemmer commented on July 2nd 19 at 17:13
July 2nd 19 at 17:06
To solve the issue with quotes like this:
echo '<select name="wslist">';
 while($weblist = mysqli_fetch_array ($list)) { 
 echo "<option value="\"{$weblist['name']}\"">{$weblist['name']}</option>";
}
 echo '</select>';

But something tells me that's not the problem.
But something tells me that's not the problem.

Yes, You are right. The variable is empty -
$curws = $_POST ['wslist'];
echo "curws = $curws";
displays just curws = (any values after the equal sign is not). - Glennie_Beie commented on July 2nd 19 at 17:09
Either the form is submitted using metho="GET" or select tag outside the form ... /form or even something like javascript, abdulayeva variables before sending. When you need more to diagnose. - Glennie_Beie commented on July 2nd 19 at 17:12
In General, it was found that the form is not sent at all. Fixed - and it worked. - Destiney.Kemmer commented on July 2nd 19 at 17:15
July 2nd 19 at 17:08
You oddly put quotes around the echo, then single, then double.

Option 1:
If the outside single, inside put a double. Or Vice versa.

Option 2:
Shielding. If you want everywhere everywhere single or double, then to those that are to be displayed place the shielding backslash.

Find more questions by tags PHP