hello!
I have been having a tough time with this little easy script, I hope someone here can show me the error of my ways. Im working with a mod called EZrealty for Joomla. the website is Kerseyre.com. When a property is selected there is an option near the bottom to print page, basically opens a new window without all the fluff. i want this condenced and since the layout has only 1
property 1 has an entry for: lights, ceptic, taxes, bedrooms
I could hard code that so they would display like this
lights | ceptic
taxes | bedrooms
the problem comes in with property 2 if it doesnt have anything for ceptic. the if statement in use doesnt allow ceptic to print since no data is found in the DB so at the least there would be an empty cell, at worst it would throw the whole table out of whack.
i came up with an idea that i think will work but for some reason the code will not cooperate. I created a variable called $counter and set it to the value of 1.
[code]<?php if( $counter = 1 ){
$counter = 2;
}
else {
print "
$counter = 1;
}?> [/code]
I added an echo $counter; to the first 5 features just to see if the numbers are switching properly but the printout shows count = 1 then 2 the next 4 times. So it seems my else is not chaning counter back to 1 nor is it printing the table row tags… I even tried removing the print line so it should just switch from 1 to 2 but unfortunately it fails.
The full code for one of these features looks like this
[code]<?php if ( $row->bedrooms >= 1 ){ ?>
<?php } ?>[/code]
any thoughts??