I have an array with 3 values: time, sensor1, sensor2
Each of those 3 contain the exact same ammount of additional values.
I would like to loop through a specific one, for example time and only get those values.
I recon with foreach I would have to go through all of the 3? Something like this (it didnt work it seems, thats why im asking):
foreach($datacollection as $valuearray)
{
$string .= "'" . $valuearray['time'] . "',";
}
I hope you understand what I'd like to do!
try:
foreach ($datacollection['time'] as $value) {
echo 'value is ' . $value;
}
is that what you want to achieve?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With