using a loop help


Posted on 16th Feb 2014 07:03 pm by admin

Hi guys , i need some help. I have this loop :
while ($row = mysql_fetch_assoc($Result)) { ?>
<th><?php echo "<a href=http://".$row['booking_site'].">";
echo $row['bookingname'];
Did you know?Explore Trending and Topic pages for more stories like this.
echo "</a>";
?>
</th>
<th><?php echo number_format($row['com'],0,'.',','); ?></th>
<th><?php echo number_format($row['AlexaRanking'],0,'.',','); ?></th>

'com' - is an integeir
i need help with replacing this $row['com'] IF the number is 0 with a DASH (-) how may i include an if an else statement or a prematch inside or outside the while loop?
No comments posted yet

Your Answer:

Login to answer
142 Like 10 Dislike
Previous forums Next forums
Other forums

$variable = $variable
Hello

Sorry if this is a really simple question but I have run out of ideas. Is there a reall

Basic Question Regarding PHP Includes
Hi

Just starting out with PHP.

Working on a site that uses some basic includes, these

Hotlinking Picasa as the image folder of a website
Hi there PHP freaks, I would like to create a private album in Picasa to use it as the image folder

captcha error
I have been trying to implement a captcha in php...

here is the code..
Code: (php) [Select

Error with login script
I am getting an error with my login script:

Error:
Code: Warning: Cannot modify header inf

Packet Design
Hi All,
Im new about network programming and I want to design a protocol but I have some question

Wierd if else problem
Hi guys,

this probably aint wierd for you, but it seems like php is playin up to me. may b i

Setting condidtions for an input box
Hi all,

I would like to set a condition in a txt box that says the number a user enters has t

XML Grouping
I'm using xml_parse_into_struct to get all my elements, but now I need to group them. For example, h

PHP arrays into arrays need help
Hello
I am trying to highlight the days on my calendar based on the dates that i have in my datab

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