Basic question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
afusa
Forum Newbie
Posts: 1
Joined: Fri Oct 07, 2011 2:25 pm

Basic question

Post by afusa »

This is a basic question:

I am trying to change this code so that if a team hasnt played "vs." is the separator, but if they have ":" is the separator.

<tr id="score" valign="top">
<th id="match_thome" width="44%" nowrap="nowrap"><?php echo $match->home?>&nbsp;</th>
<th id="match_rhome" align="right" width="6%" nowrap="nowrap"><?php echo ($match->m_played?$match->score1.(($match->bonus1 && $match->bonus1 != '0.00')?"(<font style='font-size:75%;'>".floatval($match->bonus1)."</font>)":""):'').'&nbsp;:'?></th>
<th id="match_raway" width="6%" nowrap="nowrap">&nbsp;<?php echo ($match->m_played?$match->score2.(($match->bonus2 && $match->bonus2 != '0.00')?"(<font style='font-size:75%;'>".floatval($match->bonus2)."</font>)":""):'');?></th>
<th id="match_taway" width="44%" nowrap="nowrap"><?php echo '<div style="float: left; ">&nbsp;'.$match->away.'</div>'; if($this->enbl_extra && $match->is_extra){ echo "<div id='overtime' style='float: left;'> (".JText::_('BL_RES_EXTRA').")</div>";}?></th>
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Basic question

Post by social_experiment »

It doesn't look like the code you pasted generates the 'vs' value. Can you paste additional code related to this script
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply