Jump to content

[SOLVED] Need help adding PHP code in HTML table tag!!!


dauzy

Recommended Posts

Hello,

 

I'm trying to calendar from a table and have the background change dynamically.  The problem that I'm having is that I'm having trouble having the php code echo out a new table with the table data background take in a variable... Here's the code which probably help explain my problem. 

 

if(in_array($day_num, $directory))

{

$something = "$day_num";

$something_good = ".jpg";

$something_real_good = "images/_calendar/July/calendar/"

$good_stuff = $something_real_good.$day_num.$something_good;

echo '<td width="145px" height="145px" background="<?php $something_real_good; ? >'.$day_num.'</td>';  <--- this is where i need help. 

 

                $day_num++;

$day_count++;

}

 

So when the code does the echo i want it to echo out if $day_num is 3...

 

echo '<td width="145px" height="145px" background="images/_calendar/July/calendar/3.jpg">'.$day_num.'</td>'; 

 

and when it goes to the HTML it will bring up that picture in that directory as the background....

 

Thanks for the help,

Dauzy

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.