WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('in-progress') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('pending') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

HTML selected Attribute | Loop and Break

HTML option selected Attribute

The selected attribute is a boolean attribute.
When present, it specifies that an option should be pre-selected when the page loads.
The pre-selected option will be displayed first in the drop-down list.

Basic Example

<!DOCTYPE HTML>
<html>
<head>
<title>Select option default</title>
</head>
<body>
	<select name="sel1">
		<option value="1">1</option>
		<option value="2">2</option>
		<option value="9" selected="selected">9</option>
		<option value="3">3</option>
	</select>
</body>
</html>

Example (in nested loops)

<?php
$array = '9,8,2,1';
$newar = explode(",", $array);
$dummy = 0;

$i = 0;

for ($i = 0; $i < 4; $i ++) {
    ?>
<select name="<?php echo $i ?>">
<?php
    for ($j = 0; $j < 4; $j ++) {
        if ($j == 0) {
            ?>
            <option value="<?php echo $newar[$dummy]; ?>" selected><?php echo $newar[$dummy]; ?></option>
            <?php
            $dummy++;
        } else {
            ?>
            <option value="<?php echo $j; ?>"><?php echo $j; ?></option>
            <?php
        }
        ?>
<?php
}
    ?>
</select>
<?php
}
?>
Share

You may also like...