Have been off the PHP scene for a long time. I now need to adjust a Wordpress plugin and basically have the following :
$count_of_stuff=10
for ($i=0; $i<$count_of_stuff; $i++) {
$wpdb->insert($wpdb->prefix."numbers_table", array(
"id" => $id,
"num" => $number));
$number++;
}
Instead of using $number++ ( incrementing by 1 ) I need to pull from a list of numbers that arent necessarily sequential. ( 123,345,346,457,458,459 ). ( I will store these in a table )
Any thoughts/assistance? I am looking at the range option currently so may find an answer...
Thank you .
"num" => $number[$i]referencing an array$number = [123,345,346,457,458,459, ...];defined before the loop (and drop the line with$number++)