‘123 Main St’,
‘status’ => ‘on’,
),
array(
‘address’ => ‘456 Oak Ave’,
‘status’ => ‘off’,
),
// Add more demo data as needed
);
// Table name
$table_name = $wpdb->prefix . ‘address_location’;
// Insert data into the custom table
foreach ($demo_data as $data) {
$wpdb->insert(
$table_name,
$data,
array(‘%s’, ‘%s’) // Data format (string for ‘address’, string for ‘status’)
);
}
echo ‘Demo data inserted successfully!’;
?>