0

Hi,

I am upgrading from php4 to php5 and get this error message when i go live :
"Notice: Undefined variable: eff in /home/test5/www/includes/lanekalkulator.php on line 226 %) "

Code:

<br />
<div style='margin-top: 5px;'>= <span style='font-weight:bold;font-size:18px;'><?php echo ceil($resultat2); ?></span> kr,- pr. måned <em><span style='font-size: 11px'>(nom. rente 11.9% og eff. rente <?php echo $eff; ?>%)</span></em>
				<br />
2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Espenij
0

Hello Espenij,

It looks like the problem is with the $eff varaible.
You have not assigned a value to this variable, and PHP is complaining about that.
You can't echo something that doesn't exist.

You can first check to see if exists or not. If it does, then you echo it:

if(isset($eff))
{
    echo $eff;
}

or you can just make sure you assign a value to it before you try to use it, even if you make it an empty string before you echo it.

Hope this helps.

0

Hi,

it didnt work, I have just deleted the whole code.

But thanks anyways.

Espen

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.