Jump to content

Pharsing Arrays Inside a PHP with Include


TRI0N

Recommended Posts

Okay need to keep a array from being seen but needs to be pharsed so that it is included from within another php.

 

<? php include "/dir/hidden.php?array1=Tadaa" ; ?>

 

What happens is the include thinks the whole file name to include in everything that is inside the quotes and the array's are not pharsed and do not work.

 

How would I go about making this work using the above example?

I'm not sure if I have understood you well. Let me try.

 

index.php:

include 'file.php';

 

file.php:

$array = array('val1', 'val2');

 

And, in your index.php you can use it like any other variable. Where is your problem?

 

I hope this could be useful for you. ;)

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.