How to set select option selected by value from array PHP?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
16 views
Hello! There is an array:
Array ( [0] => Array ( [id] => 14 [c_name] => toto [url] => https://ranking.com [repetition] => 3 [ton] => 3 [type] => 2 [date] => 12.04.2018 ) [1] => Array ( [id] => 15 [c_name] => toto [url] => https://ranking.com [repetition] => 1 [ton] => 2 [type] => 4 [date] => 12.04.2018 ) [2] => Array ( [id] => 16 [c_name] => toto [url] => https://ranking.com [repetition] => 2 [ton] => 2 [ton] [type] =>4 [date] => 12.04.2018 ) )

There is also a table with selectabe type
echo "";

In this array there are [ton], whose value must be the value option. Can you please tell me how to make the select with this value has been selected.
cycle and display the table I do not need. it is only necessary to deal with the selekt

Thank you
by | 16 views

1 Answer

0 like 0 dislike
Display a select in a loop with a check if it's the right option, rate it selected
Or after scripts select the desired set the desired value
by

Related questions

0 like 0 dislike
2 answers
asked Apr 5, 2019 by Aderus
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
36,596 users