There are probably lots of array questions. But I couldn't find one that answered this specific problem:
I have an associative array as a result from a database query. I loop trough it with a foreach loop. One of the columns contains a number. If that number is larger than 1, I have to duplicate that row x number of times so that the array will have x similiar rows.
I wonder how to do this?
foreach( $db_rows as $key => $value )
{
if( $value["number"] > 1 )
//DUPLICATE $value and insert x number of times into $db_rows directly after $key.
}