TRI0N Posted April 15, 2007 Share Posted April 15, 2007 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? Link to comment https://forums.phpfreaks.com/topic/47157-pharsing-arrays-inside-a-php-with-include/ Share on other sites More sharing options...
anthylon Posted April 16, 2007 Share Posted April 16, 2007 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. Link to comment https://forums.phpfreaks.com/topic/47157-pharsing-arrays-inside-a-php-with-include/#findComment-229995 Share on other sites More sharing options...
guyfromfl Posted April 16, 2007 Share Posted April 16, 2007 are you trying to include a class? then pass vars to the functions in the class? if so then you include the file then create a new instance Link to comment https://forums.phpfreaks.com/topic/47157-pharsing-arrays-inside-a-php-with-include/#findComment-229996 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.