How can I get the values of each input field (both hidden and visible) using jQuery?
<?php
$date = date('m-d-Y');
$ts = strtotime($date);
$year = date('o', $ts);
$week = date('W', $ts);
for($i = 1; $i <= 7; $i++) {
?><td><?php
$ts = strtotime($year.'W'.$week.$i);
?><input type="text" name="days" id="days" />
<input type="hidden" name="date_now" id="date_now" value="<?php print date("Y-m-d", $ts); ?>" />
</td><?php
}
?>
changing the id=’days’ and id=’date_now’ to classes (class=’days’ and class=’date_now’) assuming you want all the values, we can put them into an array like this:
now the variables
days_arrayanddate_now_arraycontain all the values.