Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries



Links

Issociate
Impressum

';
for($col = 0; $col < count($myarray[$row]); $col++){
$result .= '';
}
$result .= '';
}
return $result;
}

function bpm($cue, $play){
//if( abs($play - 2 * $cue) < abs($play - $cue) ) $cue = $cue * 2;
//else if( abs(2*$play - $cue) < abs($play -$cue) ) $play = $play *
2;
return ((-100 * ($cue - $play))/$cue); // ***LINE 58***
}
?>

Report this message

';
> for($col = 0; $col < count($myarray[$row]); $col++){
> $result .= '';
> }
> $result .= '';
> }
> return $result;
> }
>
> function bpm($cue, $play){
> //if( abs($play - 2 * $cue) < abs($play - $cue) ) $cue = $cue * 2;
> //else if( abs(2*$play - $cue) < abs($play -$cue) ) $play = $play *
> 2;
> return ((-100 * ($cue - $play))/$cue); // ***LINE 58***
> }
> ?>
>
>

What's actually in $cue and $play? Try echoing them to see. I suspect
one or both is not numeric.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Report this message

';
be
$result .= '';

and I assume $cue is not zero
and then both $cue and $play are numerics

what's the code that calls this bpm() function look like ?

DJ Craig wrote:
> I keep getting this error:
> Fatal error: Unsupported operand types in
> /usr/local/etc/httpd/htdocs/djtricities/kat/bpmchart/chart.p hp on
line
> 58
>
> I've looked for hours for some type of error, and tried lots of
> different things, but I can't get it to work. I did a google search
> for "unsupported operand types" and for most of the people getting
this
> error, it was something to do with the version of PHP that they were
> running, but I can't change that because it's a shared server from a
> hosting company. I'm using PHP version 4.3.11 on Linux. Heres the
> program around line 58:
> _________________________________
> function makeTable($myarray){
> $result = "";
> for($row = 0; $row < count($myarray); $row++){
> $result .= '';
> for($col = 0; $col < count($myarray[$row]); $col++){
> $result .= '';
> }
> $result .= '';
> }
> return $result;
> }
>
> function bpm($cue, $play){
> //if( abs($play - 2 * $cue) < abs($play - $cue) ) $cue = $cue * 2;
> //else if( abs(2*$play - $cue) < abs($play -$cue) ) $play = $play *
> 2;
> return ((-100 * ($cue - $play))/$cue); // ***LINE 58***
> }
> ?>
>

Report this message

#1: Unsupported operand types

Posted on 2005-05-13 03:42:04 by DJ Craig

I keep getting this error:
Fatal error: Unsupported operand types in
/usr/local/etc/httpd/htdocs/djtricities/kat/bpmchart/chart.p hp on line
58

I've looked for hours for some type of error, and tried lots of
different things, but I can't get it to work. I did a google search
for "unsupported operand types" and for most of the people getting this
error, it was something to do with the version of PHP that they were
running, but I can't change that because it's a shared server from a
hosting company. I'm using PHP version 4.3.11 on Linux. Heres the
program around line 58:
_________________________________
function makeTable($myarray){
$result = "";
for($row = 0; $row < count($myarray); $row++){
$result .= '

' . $myarray[$row][$column] . '

Mr Ad

Google

#2: Re: Unsupported operand types

Posted on 2005-05-13 05:47:49 by Jerry Stuckle

DJ Craig wrote:
> I keep getting this error:
> Fatal error: Unsupported operand types in
> /usr/local/etc/httpd/htdocs/djtricities/kat/bpmchart/chart.p hp on line
> 58
>
> I've looked for hours for some type of error, and tried lots of
> different things, but I can't get it to work. I did a google search
> for "unsupported operand types" and for most of the people getting this
> error, it was something to do with the version of PHP that they were
> running, but I can't change that because it's a shared server from a
> hosting company. I'm using PHP version 4.3.11 on Linux. Heres the
> program around line 58:
> _________________________________
> function makeTable($myarray){
> $result = "";
> for($row = 0; $row < count($myarray); $row++){
> $result .= '

' . $myarray[$row][$column] . '

#3: Re: Unsupported operand types

Posted on 2005-05-13 16:27:31 by lesperancer

shouldn't this
$result .= '

' . $myarray[$row][$column] . '' . $myarray[$row][$col] . '
' . $myarray[$row][$column] . '

#4: Re: Unsupported operand types

Posted on 2005-05-13 17:23:19 by DJ Craig

Thanks, you were right, I was passing the bpm() function arrays. But I
still can't figure out how they got to be arrays. I used the each()
function in a while loop. Heres the code that calls the function:
while($col = each($cols)){
$rowNum = 0;
while($row = each($rows)){
$result[$rowNum][$colNum] = bpm($row, $col); //$row and $col are both
arrays here for some reason...
echo $result[$rowNum][$colNum] . '-';
$rowNum++;
}
$colNum++;
}
echo '

' . makeTable($result) . '
';

Report this message

#5: Re: Unsupported operand types

Posted on 2005-05-13 17:49:34 by Oli Filth

DJ Craig wrote:
> Thanks, you were right, I was passing the bpm() function arrays. But
I
> still can't figure out how they got to be arrays. I used the each()
> function in a while loop. Heres the code that calls the function:
> while($col = each($cols)){
> $rowNum = 0;
> while($row = each($rows)){
> $result[$rowNum][$colNum] = bpm($row, $col); //$row and $col are
both
> arrays here for some reason...
> echo $result[$rowNum][$colNum] . '-';
> $rowNum++;
> }
> $colNum++;
> }
> echo '

' . makeTable($result) . '
';

each() returns an array. See the PHP manual.

--
Oli

Report this message

#6: Re: Unsupported operand types

Posted on 2005-05-13 18:00:14 by Ewoud Dronkert

On 13 May 2005 08:49:34 -0700, Oli Filth wrote:
>> while($col = each($cols)){
>
> each() returns an array. See the PHP manual.

Yeah, http://php.net/each or try http://php.net/foreach


--
Firefox Web Browser - Rediscover the web - http://getffox.com/
Thunderbird E-mail and Newsgroups - http://gettbird.com/

Report this message

#7: Re: Unsupported operand types

Posted on 2005-05-13 19:03:36 by DJ Craig

Thanks, I've got it working now :-)

Report this message