Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 739315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:23:10+00:00 2026-05-14T08:23:10+00:00

I get this error from my script: [Fri Apr 23 10:57:42 2010] [error] [client

  • 0

I get this error from my script:

[Fri Apr 23 10:57:42 2010] [error] [client 10.0.0.1] PHP Fatal error:  Cannot re-assign $this in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\abp\\fol\\test.php on line 27, referer: http://abp.bhc.com/fol/

Here is the code which produces the error:

<?php
$voiceboxes = array(
    '141133'    => array(
        'title' => 'Title',
        '1'     => array(
            'Title' => 'Title2',
            'Link'  => 'http://...',
        ),
        '12'    => array(
            'Title' => 'Title3',
            'Link'  => 'http://...',
        )
    ),
    '1070453'   => array(
        'title' => 'Title4',
        '1'     => array(
            'Title' => 'Title5',
            'Link'  => 'http://...',
        )
    )
);
$last = 0;
//$this = 0;
echo "<ol>\n";
foreach ($voiceboxes as $key => $value) {
    $last = 0;
    $this = null; //Error is thrown here, Line 27
    //$voiceboxes[$key]['title']
    echo "<ol>\n";
    foreach ($value as $key2 => $value2) {
        if ($key2 == 'title') {
            echo "<li>$value2</li>\n";
        } else {
            $this = (int) $key2;
            if ($this == $last + 1) {
                echo '<li>';
            } else { '<li value="' . $key2 . '">';}
            $last = $key2;
            echo $voiceboxes[$key][$key2]['Title'] . "<br/>" . $voiceboxes[$key][$key2]['Link'] . '</li>' . "\n";
        }
    }
    echo "</ol>\n";
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:23:10+00:00Added an answer on May 14, 2026 at 8:23 am

    $this is a predefined variable in PHP.

    Here’s the reference in the PHP manual: Classes and Objects: The Basics. It describes how, inside a method, $this points to “this object” that is being operated upon. It is still reserved outside a method, though.

    Change the identifier to another word.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried register script for cake from here and i get this error: Fatal
whenever I try to call my ejb from a client, I get this error
When I run my script, I get this error message: Syntax error: TypeError: Cannot
I get this error message from a Ghostscript call: Error: /syntaxerror in -file- Operand
I get this error about casting from type A to type B because the
I need to get a value from another page. But I get this error
I get a parse error from Safari with this code: for (var i=0; i<parent.frames.length;
Why I'm getting this error. My variables get the names from request, and also
Hi I keep getting this error, I'm trying to get tweets from twitter via
I get this error when trying ruby script/console Rails requires RubyGems >= . Please

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.