PHP arrays into arrays need help


Posted on 16th Feb 2014 07:03 pm by admin

Hello
I am trying to highlight the days on my calendar based on the dates that i have in my database. Currently I can only get it to display the last element in the database which leads me to believe that i have an error in my arrays

Code:
<?php
## My database
$query = mysql_query("SELECT * FROM speaking_engagements");
while($result = mysql_fetch_array($query)){
$dates = $result['date'];
$dates = explode('-',$dates);
$dates = $dates[2];
}
#$dates = explode('-',$dates);
#$dates = $dates[2];
#$numdays = count($dates);
$time = time();
$today = date('j',$time);
$days = array(
$today=>array(NULL,NULL,'<span style="color: red; font-weight: bold; font-size: larger;">'.$today.'</span>'),
$dates=>array('#'),
8=>array('#'), ## a hard coded one that works
);
$today = getdate();
$year = $today['year'];
$month = $today['mon'];
echo '<div id="calendar">';
echo generate_calendar($year, $month, $days, 3, NULL, '/weblog/archive/2004/Jan');
echo '</div>';
?>

No comments posted yet

Your Answer:

Login to answer
186 Like 34 Dislike
Previous forums Next forums
Other forums

Shuffle between users ??
I have multiple $users in table. I need to send them $message.

I need to send the next messag

UDP Multicast question
Hey,

Im not really in the know when it comes to network related programming and activitie

Warning: mysql_num_rows() expects parameter 1
When i add quote at the end of this link
example:http://localhost/articlemania/category.php?cid=3

remove trailing slash from array
I have the following array which contains trailing slashes I need to remove. What is the best way to

Error Messaging not working
I changed the way my form tells the user of an error. But I can't seem to get it to work properly.

Re-Order by ID Number
I have a cms set up for inputting an image, thumb, title, pdf, and eps. When input the database ass

Onclick problem in Firefox
Hi,
I am using a . It doesn't seem to

Change Web page language
i doing this thing first time but i dont find any suitable solution for it. On the demand of user. I

small inaccuracies
I have this code to convert fractional base 10 into base 2:

while($num > 0)

phpmailer class & pop.gmail.com?
Code: <?php
$mail->IsSMTP();
$mail->Host = "pop.gmail.com";

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash