I use
foreach($terms as $one)
{
print $one."<br>";
}
But this only prints the values. What about the keys?
I use
foreach($terms as $one)
{
print $one."<br>";
}
But this only prints the values. What about the keys?
foreach($terms as $key => $one)
{
print $key . ' ' . $one . '<br>';
}
By adding $key => to the foreach, you will be able to access the key as $key above.