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 3352110
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:59:24+00:00 2026-05-18T01:59:24+00:00

I am getting the following errors Notice: Undefined variable: header in C:\wamp\www\test\test1.php on line

  • 0

I am getting the following errors

Notice: Undefined variable: header in C:\wamp\www\test\test1.php on line 27
Notice: Undefined variable: row in C:\wamp\www\test\test1.php on line 41
Deprecated: Function split() is deprecated in C:\wamp\www\test\test1.php on line 42
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 43
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 44
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 45
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 46
Notice: Undefined variable: sortkey in C:\wamp\www\test\test1.php on line 47
Deprecated: Function split() is deprecated in C:\wamp\www\test\test1.php on line 42
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 43
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 44
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 45
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 46
Notice: Undefined variable: sortkey in C:\wamp\www\test\test1.php on line 47
Deprecated: Function split() is deprecated in C:\wamp\www\test\test1.php on line 42
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 43
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 44
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 45
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 46
Notice: Undefined variable: sortkey in C:\wamp\www\test\test1.php on line 47
Deprecated: Function split() is deprecated in C:\wamp\www\test\test1.php on line 42
Notice: Undefined offset: 3 in C:\wamp\www\test\test1.php on line 42
Notice: Undefined offset: 2 in C:\wamp\www\test\test1.php on line 42
Notice: Undefined offset: 1 in C:\wamp\www\test\test1.php on line 42
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 43
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 44
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 45
Notice: Undefined variable: sortby in C:\wamp\www\test\test1.php on line 46
Notice: Undefined variable: sortkey in C:\wamp\www\test\test1.php on line 47

With the following code

 <span class="style2">
<style type="text/css">
<!--
body, th, td, p, small {
    font-family:'Times New Roman',Times,serif;
    font-size:100%;
    color:#757675;
}
small {font-size:90%;}

td, th {
    background-color:#FFFFFF;
    border:1px solid #CCCCCC;
    padding:7px 20px 7px 20px;
}
th {background-color:#a5a5a5; color:#FFFFFF;}

h1 {font-size:120%; color:#558;}
h1 .sortby {color:#855;}
-->
</style>
</span>

<?php
echo '<h1><span class="sortby">'.$header.'</span></h1>
<table cellspacing="5" summary="List of demo fields">
<tr>
<th>Date & Time Added</th>
<th>Products</th>
<th>Keys</th>
<th>Computer</th>
</tr>';

$fp = fopen('key.txt','r');
if (!$fp) {echo 'ERROR: Unable to open file.</table></body></html>'; exit;}

while (!feof($fp)) {
    $line = fgets($fp,1024); //use 2048 if very long lines
    $row++;
    list ($date, $products, $keys, $computer) = split ('\|', $line);
    if ($sortby == 'Date Added') $sortkey = strtolower($date);
    if ($sortby == 'Products') $sortkey = strtolower($products);
    if ($sortby == 'Keys') $sortkey = strtolower($keys);
    if ($sortby == 'Computer') $sortkey = strtolower($computer);
    $col[$row] = array($sortkey, $date, $products, $keys, $computer);
}

fclose($fp);

$arrays = count($col) - 1;

$loop = 0;
while ($loop < $arrays) {
    $loop++;
    echo '
<tr>
<td>'.$col[$loop][1].'</td>
<td>'.$col[$loop][2].'</td>
<td>'.$col[$loop][3].'</td>
<td>'.$col[$loop][4].'</td>
</tr>';
}

echo '
</table>
 '
?>

BUT my table is showing correctly and is doing what i want it to do I dont know why iam getting these errors.

  • 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-18T01:59:25+00:00Added an answer on May 18, 2026 at 1:59 am

    There are no errors in your Code. Tat are notice-messages. They are telling you the following problems with your code:

    1. split() is deprecated (You should use another mothod explode for example: http://php.net/manual/en/function.split.php
    2. you sould initialise variables before using them:
      if(!isset($var)){$var="";

    You may disables these warning. but it would be a better coding-style to remove the warnings, by editing the code.

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

Sidebar

Related Questions

I am getting the following errors: PHP Warning: Module 'ldap' already loaded in Unknown
I am getting the following error when I get to the line that invokes
I getting the following error when I try to connect to my server app
I am getting the following error: Access denied for user 'apache'@'localhost' (using password: NO)
We’re getting the following error message when we click on Search Settings for a
I'm getting the following error when trying to run a JSP. I'm using Tomcat
I'm getting the following error when trying to build my app using Team Foundation
I am getting the following error whenever I click on a postbacking control HttpException
I am getting the following error when I put class files in subfolders of
I am getting the following error when I post back a page from the

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.