creating an array from sql content
Posted: Mon Sep 22, 2008 5:30 am
hi guys this is a sample from the array I need
I need to add each class to this array from mysql but I cant use while inside the array to add each class
I don't know alot about array but if there be a command like $array="".$array."newwarray" or something like it or any other way plz help me
(I mean I need to create such an array from sql to draw my classes)
thanks
Code: Select all
$classes_arr = array(
// Classes for monday (day 1)
0 => array(
// Adds a class at 12pm (1200 hours)
1200 => array(
"html" => "<b>Psychology</b><br>Room 404", // Display 'Phsychology: Room 404'
"style" => "background-color: #66CCCC", // use style property to change the background color
"interval" => 120 // set the interval for 2hrs
)
),
// Classes for wednesday (day 3)
3 => array(
// Adds a class at 11am (1100 hours)
1100 => array(
"html" => "<b>English 101</b><br>Room 235", // Display 'English 101: Room 235'
"interval" => 120 // set the interval for 2hrs
)
)
);I don't know alot about array but if there be a command like $array="".$array."newwarray" or something like it or any other way plz help me
(I mean I need to create such an array from sql to draw my classes)
thanks