Strange effect

Strange effect

am 15.08.2007 12:24:45 von Hans-Peter Sauer

www.outerlimitsfan.co.uk/render.jpg

The browser names are pulled from a array and most of the time get
displayed with no problems .

But sometimes only the first letter of the browser name gets displayed
as shown in the above image .

? .





$broo[1]="Internet Explorer";
$broo[2]="Firefox";
$broo[3]="Opera";
$broo[4]="Safari";
$broo[5]="Macintosh";
$broo[6]="Unknown";

?>


$tvx=1;
while ($tvx<7)
{
$zod=$broo[$tvx];
$uzi="users";
if ($curd[$tvx]==0) {$uzi="";}
if ($curd[$tvx]==1) {$uzi="user";}
print "";
print "";
print "";
print "";
print "";
print "";
print "";
print "";
print "";
print "";
print "";
print "";
print "";
$tvx=$tvx+1;
}
?>
 $zod $hippy1$curd[$tvx]$uzi $hippy2$jamm[$tvx]most ever online 

Re: Strange effect

am 15.08.2007 12:46:32 von gosha bine

On 15.08.2007 12:24 Krustov wrote:
> www.outerlimitsfan.co.uk/render.jpg
>
> The browser names are pulled from a array and most of the time get
> displayed with no problems .
>
> But sometimes only the first letter of the browser name gets displayed
> as shown in the above image .
>
> ? .
>
>
>
>
>
> $broo[1]="Internet Explorer";
> $broo[2]="Firefox";
> $broo[3]="Opera";
> $broo[4]="Safari";
> $broo[5]="Macintosh";
> $broo[6]="Unknown";
>
> ?>
>
>


> > $tvx=1;
> while ($tvx<7)
> {
> $zod=$broo[$tvx];
> $uzi="users";
> if ($curd[$tvx]==0) {$uzi="";}
> if ($curd[$tvx]==1) {$uzi="user";}
> print "";
> print "";
> print "";
> print "";
> print "";
> print "";
> print "";
> print "";
> print "";
> print "";
> print "";
> print "";
> print "";
> $tvx=$tvx+1;
> }
> ?>
>
 $zod $hippy1$curd[$tvx]$uzi $hippy2$jamm[$tvx]most ever online 


I like your variable naming. ;)

Try var_dump instead of echo add look what it says.


--
gosha bine

makrell ~ http://www.tagarga.com/blok/makrell
php done right ;) http://code.google.com/p/pihipi

Re: Strange effect

am 15.08.2007 12:47:04 von luiheidsgoeroe

On Wed, 15 Aug 2007 12:24:45 +0200, Krustov wrote:
> www.outerlimitsfan.co.uk/render.jpg
>
> The browser names are pulled from a array and most of the time get
> displayed with no problems .
>
> But sometimes only the first letter of the browser name gets displayed
> as shown in the above image .

The code doesn't seem the problem. The only way I can think of this can
happen is if you accidentally select the first 'array-item' of a string
($zod[0]), but that doesn't happen anywhere in the code.

I've reloaded your frontpage a couple of dozens of times, can't seem to
reproduce the error.

If it's displayed incorrectly, is the HTML source also wrong, or is it
just the displaying of it? It might be more of an HTML/CSS/UA issue.
--
Rik Wasmus

Re: Strange effect

am 15.08.2007 15:05:38 von Hans-Peter Sauer




<46c2d9a4$0$11218$6e1ede2f@read.cnntp.org>

> Try var_dump instead of echo add look what it says
>

www.outerlimitsfan.co.uk/bin.jpg

Hadnt used var_dump before the above is the result .


$tvx=1;
while ($tvx<7)
{
var_dump($broo[$tvx]);
$zod=$broo[$tvx];

Re: Strange effect

am 15.08.2007 15:05:39 von Hans-Peter Sauer






> I've reloaded your frontpage a couple of dozens of times, can't seem to
> reproduce the error.
>

Most of the time it only happens the first time the page is looked at .


--
(c) The Amazing Krustov

Re: Strange effect

am 15.08.2007 15:10:06 von luiheidsgoeroe

On Wed, 15 Aug 2007 15:05:39 +0200, Krustov wrote:

>
>
>
>
>
>> I've reloaded your frontpage a couple of dozens of times, can't seem =
to
>> reproduce the error.
>>
>
> Most of the time it only happens the first time the page is looked at =
..


Hmmm, according to the output you provided from a var_dump, it seems the=
=

variable is wrong in that case. Is your variable really created like:

$broo[1]=3D"Internet Explorer";
$broo[2]=3D"Firefox";
$broo[3]=3D"Opera";
$broo[4]=3D"Safari";
$broo[5]=3D"Macintosh";
$broo[6]=3D"Unknown";
?>

Or is it created in another way (and if so, how)?
-- =

Rik Wasmus