Hi peeps,
Firstly just gotta say it looks a good php resource so far 🙂
Now this is an amatuer problem (treat me gently im trying to learn 🙂 )
I have a multi dimensional array and at the moment im just trying to get it to print out.
Here is the code snippet:
$provider1 = array (
"New" => array(
"80",
"90",
"100",
"110"),
"Newer" => array(
"83",
"93",
"103",
"113"),
"Newest" => array(
"85",
"95",
"105",
"115")
);
for($i = 0; $i < 3; $i++)
{
for($j = 0; $j < 4; $j++)
echo $provider1[$i][$j] . "<br>";
}
Now I think I have a handle on multi dimensional arrays. However when I try and run this code via a get, I get the error Notice: Undefined offset: x in C:\Program Files\Apache Group\Apache2\htdocs\sms3.php on line 34.
x varies and this error repeats several times with different offsets. Line 34 is the line with the echo command on it.
I have googled for it but im not getting a clear picture as to what the problem is. Its probabily dead simple but im a newb 😉
Cheers
Stu