Jump to content

Problem with Variable in PHP


Recommended Posts

I have about 40 varibles declared in file var.php:

<?
$a[0][0]=1;
$a[0][1]=2;
.......
.......
$t[1][1]=26;
?>

and below is the code from file index.php that has problem:

<?
require 'var.php';
?>

......some code.....

<?
echo 'a = ' . $a[0][0];
?>

......some code....

<?
echo 'a = ' . $a[0][0];
?>

The problem is: I did not change any value of the variables, but some variables $a[0][0] at the bottom of index.php displayed nothing on the page :wacko: . Can you help me with that?

Link to comment
Share on other sites


This is the weirdest thing:

<?
$a[0][0]=1;
?>
.................
.................
<?
echo "a = " . $a[0][0];
?>
................
................
<?
echo "a = " . $a[0][0];
?>

the result is:

a = 1
a =

I got nothing for $a[0][0] at the bottom of the page :wacko: .

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...