Jump to content

Variable recognized by IDE but on the server.


the5thace

Recommended Posts

Notice: Undefined variable: bing_results in /home/msc2012/12254822/public_html/safe_dir/Almost_Gs.php on line 295

 

Basically, its the 'Interleaving' case that does not work as the echoed variables are not recognized when run on the server but the IDE does not highlight them as errors so it recognizes them.

 

If you pay attention further down the switch statement under other cases I use the same variable $bing_results where it works and is recognized by the server.

 

The scenario is the same with $Blekko and $Google

    case 'Interleaving':
        $irl =0;
        while($irl <= 90)
        {   
            echo 'hellooo!!';
            echo '<a href ='.$bing_results[$irl]['url'].'><h5>'.$bing_results[$irl]['url_title'].'</h5></a><br>';
            echo '<p>'.$bing_results[$irl]['snippet'].'</p><br>';
            echo '<p>'.$bing_results[$irl]['rank'].'<p><br>';
            echo '<b>'.$bing_results[$irl]['engine'].'</b><br>';
            echo '<hr>';    
            echo '<a href ='.$Blekko[$irl]['url'].'><h5>'.$Blekko[$irl]['url_title'].'</h5></a><br>';
            echo '<p>'.$Blekko[$irl]['snippet'].'</p><br>';
            echo '<p>'.$Blekko[$irl]['rank'].'<p><br>';
            echo '<b>'.$Blekko[$irl]['engine'].'</b><br>';
            echo '<hr>';
            echo '<a href ='.$google[$irl]['url'].'><h5>'.$google[$irl]['url_title'].'</h5></a><br>';
            echo '<p>'.$google[$irl]['snippet'].'</p><br>';
            echo '<p>'.$google[$irl]['rank'].'<p><br>';
            echo '<b>'.$google[$irl]['engine'].'</b><br>';
            echo '<hr>';
            $irl++;
        }
            break;
    
    case 'Non-Aggregated':
    $nag_c=0;    // non aggregated count 
    while ($nag_c <=$blekko_count)
    {
        echo '<a href='.$Blekko[$nag_c]['url'].'><h4>'.$Blekko[$nag_c]['url_title'].'</h4></a>';
        echo '<p>'.$Blekko[$nag_c]['snippet'].'<p>';
        echo '<b>'.$Blekko[$nag_c]['engine'].'</b>';   
        echo '<hr>';
        $nag_c++;
    }
   $nag_c =0;
    while ($nag_c <= $google_count)
    {
        echo '<a href='.$google[$nag_c]['url'].'><h4>'.$google[$nag_c]['url_title'].'</h4></a>';
        echo '<p>'.$google[$nag_c]['snippet'].'</p><br>';
        echo '<b>'.$google[$nag_c]['engine'].'</b><br>';
        echo '<hr>';
        $nag_c++;
    }
   
    $nag_c=0;
    while ($nag_c<=$bing_count)
    {
        echo '<a href='.$bing_results[$nag_c]['url'].'>'.'<h4>'.$bing_results[$nag_c]['url_title'].'</h4></a>';
        echo '<p>'.$bing_results[$nag_c]['snippet'].'</p>';
        echo '<b>'.$bing_results[$nag_c]['engine'].'</b>';
        echo '<hr>';
        $nag_c++;
    }
case 'Bing':
    $binger = 0;
    while ($binger<=$bing_count)
    {
        echo '<a href='.$bing_results[$binger]['url'].'>'.'<h4>'.$bing_results[$binger]['url_title'].'</h4></a>';
        echo '<p>'.$bing_results[$binger]['snippet'].'</p><br>';
        echo '<b>'.$bing_results[$binger]['engine'].'</b><br>';
        echo '<hr>';
        $binger++;
    }
    break;
case 'Blekko':
    $blekr = 0;
    while ($blekr<=$blekko_count)
    {
        echo '<a href='.$Blekko[$blekr]['url'].'><h4>'.$Blekko[$blekr]['url_title'].'</h4></a>';
        echo '<p>'.$Blekko[$blekr]['snippet'].'<p>';
        echo '<b>'.$Blekko[$blekr]['engine'].'</b>';   
        echo '<hr>';
        $blekr++;
    }
    break;
case 'Google':
    $froo = 0;
    while ($froo <=$google_count)
    {
        echo '<a href='.$google[$froo]['url'].'><h4>'.$google[$froo]['url_title'].'</h4></a>';
        echo '<p>'.$google[$froo]['snippet'].'</p>';
        echo '<b>'.$google[$froo]['engine'].'</b>';
        echo '<hr>';
        $froo++;
    }
    break;
}
?>

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.