Jump to content

Need help adding PHP code in HTML table tag!!!


dauzy

Recommended Posts

Sooo I've been trying for hours to make picture dynamically change when needed...The probably I'm having right now is having the <td> take in a php variable in for a background. 

 

Heres my code:

 

 

if(in_array($day_num, $directory))

{

$something = "$day_num";

$something_good = ".jpg";

$something_real_good = 'background="images/_calendar/July/calendar/3.jpg"';

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

echo '<td width="145px" height="145px" <?php $something_real_good; ? >'.$day_num.'</td>';

$day_num++;

$day_count++;

echo $something_real_good;

//echo $good_stuff;

//echo $day_num;

}

else

{

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

$day_num++;

$day_count++;

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.