I want to run an insert query in a loop until all the elements from an array pass.
Ex:
$signs = array("aries", "taurus", "gemini", "cancer", "leo", "virgo", "libra", "scorpio", "sagittarius", "capricorn", "aquarius", "pisces");
$config = array('sign' => 'aries',
'type' => 'daily',
'date' => date('Y-m-d'),);
$content = $horoscope->get_daily_horoscope($config);
$update = $db->prepare("INSERT INTO `horoscope` (`zodiacal_sign`, `last_updated`, `content`) values (%s,%s,%s)", $config['sign'], $config['date'], $content);
$db->query($update);
I don't know how to run this query until all of $signs
replaces $config['sign']
and the query runs all the 12 times in a loop.
Can somebody help me?