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

php mail form text wont appear / javascript included
Guys/gals...

I am running into a problem whereby I have a great piece of javascript code that

Help with Password Encoding/Decoding?
Trying to design a "change password" tool. On my signup code I'm using base64_encode, now

Creating a db with a query
Hello everyone.
I'm having troubles creating a db with a query.
I'm reading a book called PHP

SMTP server...
I recently found a tutorial online on SMTP authentification for sending emails from webpages, here i

Chat Box in PHP
I was thinking in doing a Chat Box in PHP. For that I would use a form with two fields, Nick and Mes

Loop column after 2 results
Hello All.

Here is what I have:

Client ID Company name Clien

is_dir() problem
Hello,

I'm buidling a php scripts that dynamically get's subfolders from a specific folder.

parse error
On my local machine I keep getting parse error for my footer. When I put it online, it doesn't show

How to grab certain words ??
I am working with this API

Returns JSON.
curl http://letsbetrends.com/api/current_trends

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

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