Page 1 of 1
Removing space in ajax-gizmo.php
Posted: Fri 14 Dec 2012 7:54 pm
by William Grimsley
Hi Ken,
How do you remove the space between the °C and /hr in ajax-gizmo.php?
On my site it currently shows like this: +1.2c /hr
On my site I want it to show like this: +1.2c/hr
Please can you help?
Thanks
Will
Re: Removing space in ajax-gizmo.php
Posted: Fri 14 Dec 2012 8:14 pm
by saratogaWX
williamwilbur wrote:Hi Ken,
How do you remove the space between the °C and /hr in ajax-gizmo.php?
On my site it currently shows like this: +1.2c /hr
On my site I want it to show like this: +1.2c/hr
Please can you help?
Thanks
Will
This does not seem to be a major problem (the space between the value and the /hr) as it is perfectly understandable either way.
But to humor you, change ajax-gizmo.php from
Code: Select all
<span class="ajax" id="gizmotemprate"><?php
if(isset($tempchangehour)) {
echo $tempchangehour;
} ?></span>
<?php
if(isset($tempchangehour)) {
echo langtransstr($uomPerHour);
} // $tempchangehour ?>
to
Code: Select all
<span class="ajax" id="gizmotemprate"><?php
if(isset($tempchangehour)) {
echo $tempchangehour;
} ?></span><?php
if(isset($tempchangehour)) {
echo langtransstr($uomPerHour);
} // $tempchangehour ?>
Re: Removing space in ajax-gizmo.php
Posted: Fri 14 Dec 2012 8:19 pm
by William Grimsley
Hi Ken,
Thanks for such a quick post! That did the trick.
So, you only had to move the "<?php" back a space?
Code: Select all
<span class="ajax" id="gizmotemprate"><?php
if(isset($tempchangehour)) {
echo $tempchangehour;
} ?></span>
<?php
if(isset($tempchangehour)) {
echo langtransstr($uomPerHour);
} // $tempchangehour ?>
I can't thank you anymore! You are a star Ken!
Will
Re: Removing space in ajax-gizmo.php
Posted: Fri 14 Dec 2012 8:23 pm
by saratogaWX
Yes, spaces are created by tabs/spaces/etc in the open HTML code.
PHP replaces everything between <?php and ?> with 'null' (unless the code inside the area does a print/echo).
Re: Removing space in ajax-gizmo.php
Posted: Fri 14 Dec 2012 9:50 pm
by William Grimsley
Hi Ken,
Interesting knowledge!
Thanks again!
Will