Hi All,
Although I am not a beginner you could say I am still a little green when it comes to PHP coding. With that said, I am having a very strange problem when I try to use a multidimensional array in my PHP code below.
for ( $x = 0; $x < count($uName); $x++ ) {
echo "<br>".$uName[$x][0].", ".$uName[$x][1].", ".$uName[$x][2]."\n";
}
Array is created using “$uName = array(array(array()));”
This code works just fine when I execute it from the command line (see below),
Kitchen, sonoff_134, 1
Bedroom Wall-outlet, sonoff_194, 1
C3PO, sonoff_163,
Garage Outlet, sonoff_141, 1
Garage Door, sonoff_182,
Garland Lights, sonoff_186, 0
Christmas Tree, sonoff_111, 1
but when it runs in the embedded HTML code I get the following on my web page.
Kitchen, sonoff_134,
Bedroom Wall-outlet, sonoff_194,
C3PO, sonoff_163,
Garage Outlet, sonoff_141,
Garage Door, sonoff_182,
Garland Lights, sonoff_186,
Christmas Tree, sonoff_111,
I have been working on this for some time now and have tried everything I can think of. If there are any ideas out there please enlighten me. If more code is needed just let me know.
Thank you