I have three text box for people to enter as numbers and stores in json
<?php add_option('angels_'.date("ymd-His"), json_encode($_POST)); ?>
The data stored in the database looks like
{"angle1":"60","angle2":"60","angle3":"90","submit":"Submit"}
the above is also what I get what I called out the data from the database
I used this code to call out the data
<?php
$sql = "SELECT * FROM wp_options WHERE option_name LIKE 'angels%' ORDER BY option_name";
$options = $wpdb->get_results($sql);
foreach ( $options as $option ) {
esc_attr($option->option_value).PHP_EOL;
}
$values = esc_attr($option->option_value);
echo $values;
?>
The output gives me
{"angle1":"60","angle2":"60","angle3":"90","submit":"Submit"}
if I only want to get the numbers 60/60/90 individually how can I do that?