I'm trying to have a specific Bg for a specific picture
<?php header('Content-type: text/css');?>
<?php
include 'Color.phpr';(this has $bg)
$picture[1]='div.picture
{
background-image: url('img1f');
}';
$picture[2]='
div.picture
{
background-image: url(img2.jpg');
}';
$picture[3]='
div.picture
{
background-image: url('img3');
}';
echo($picture[array_rand($picture)]);
if($bg == "1"):
$picture = '1'
elseif($bg == "2"):
$picture = '2'
else:
$picture = '3'
endif;
?>
Seems like it should work, right?
But it wont.
Thundercats, That wont do anything, i tested it for the sake of testing, and it did nothing, when i assign a class to a div,
<div class="picture">
Words
</div>
It will simply display the words.
<?php header('Content-type: text/css');?>
<?php
include 'Color.phpr';(this has $bg)
$picture[1]='div.picture
{
background-image: url('img1f');
}';
$picture[2]='
div.picture
{
background-image: url(img2.jpg');
}';
$picture[3]='
div.picture
{
background-image: url('img3');
}';
echo($picture[array_rand($picture)]);
if($bg == "1"):
$picture = '1'
elseif($bg == "2"):
$picture = '2'
else:
$picture = '3'
endif;
?>
Seems like it should work, right?
But it wont.
Thundercats, That wont do anything, i tested it for the sake of testing, and it did nothing, when i assign a class to a div,
<div class="picture">
Words
</div>
It will simply display the words.