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

  • Home
  • SEARCH
  • 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 8066891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:07:49+00:00 2026-06-05T12:07:49+00:00

I have some strange behaviour in my php script. For some reason, I can’t

  • 0

I have some strange behaviour in my php script. For some reason, I can’t create an echo, after a certain line.

include 'class/core.class.php';
include 'class/tp.class.php';

$tps = new tps;
$system = $_GET['system'];

$file = @fopen(getcwd() . "/csv/" . $system . ".csv", "r");
if(!$file) {
    echo "No data in " . getcwd() . "/csv";
    exit;
}

$tps->dropSystemData($system);

$counter = 0;

$data = array();

while($csv = fgetcsv($file, 0, ";")) {
    $data[$counter]['date'] = $csv[0];
    $data[$counter]['time'] = $csv[1];
    $data[$counter]['tp'] = $csv[2];

    $counter++;
}

foreach($data as $row) {
    $date = explode(".", $row['date']);
    echo 1; // Works
    $date = $date[2] . "/" . $date[1] . "/" . $date[0];
    echo 2; // Works
    $time = $row['time'];
    echo 3; // Works
    $tp = $row['tp'];
    echo 4; // Doesn't work
    echo $tp; // Doesn't work
    var_dump($tp); // Doesn't work
    var_dump($data); // This doesn't output anything like the echos and var_dumps before
}

I don’t see any particular reason, why this shouldn’t work. No errors at all.

Var_dump of $data

array(445) {
  [0]=>
  array(3) {
    ["date"]=>
    string(10) "03.01.2012"
    ["time"]=>
    string(8) "12:30:06"
    ["tp"]=>
    string(10) "EN1K945540"
  }
  [1]=>
  array(3) {
    ["date"]=>
    string(10) "04.01.2012"
    ["time"]=>
    string(8) "12:30:07"
    ["tp"]=>
    string(10) "EN1K945588"
  }
  [2]=>
  array(3) {
    ["date"]=>
    string(10) "04.01.2012"
    ["time"]=>
    string(8) "12:30:09"
    ["tp"]=>
    string(10) "EN1K945592"
  }
  [3]=>
  array(3) {
    ["date"]=>
    string(10) "04.01.2012"
    ["time"]=>
    string(8) "12:30:09"
    ["tp"]=>
    string(10) "EN1K945594"
  }

Added the following to the beginning, but no errors or warnings:

error_reporting(E_ALL);
ini_set('display_errors', '1');

Update: I’ve changed the variable names now, but it still doesn’t work.

Update 2: My bad, some caching issue, now closed and opened browser, now it’s working. The duplicate variable names caused the problems.

  • 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-06-05T12:07:50+00:00Added an answer on June 5, 2026 at 12:07 pm

    You do $tp = new tp; and assing to $tp an instance of tp Class

    Into the cycle, instead, you assign it a String and that mess all the things up

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

Sidebar

Related Questions

after adding adMob ads to my application, I have noticed some strange memory behaviour.
I encountered some really strange behaviour in Apache. I have a standard let PHP
I have a strange svn behaviour : For some reason, I removed a directory
I'm hacking my way through learning Flex and have found some strange behaviour. When
I have come across some strange behaviour, and I'm assuming a bug in Firefox,
I'm trying to learn python and have encountered some strange behaviour. I am experimenting
I am experiencing some strange behaviour and I really don't have test date/ environments,
I'm witnessing some strange behaviour from Fluent nHibernate. I have two objects involved in
I have fancybox installed on my website and I am getting some strange behaviour.
We have some strange behaviour with the deployment of our message queues and factories

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.