Originally Posted by ashneet
I am new at php so this might me a dumb question.
Is it possible to use part of an include file another words i make an 1 big include file and only use parts of it as needed and not make many include files.
Also is it possible to delete an whole variable so that it dont messes thing up when we get back to same page with diffrent info in th variable.
In the include file, if you do if statements, you can then include parts of it. This is how I typically call parts of an include file. Example of an include.php...
[PHP]<?php if ( $page == "1" ) { ?>
Page 1
<?php elseif ($page == "2" ) { ?>
Page 2[/PHP]
And so forth. Call it like this...
[PHP]<?php include "include.php?page=1"; ?>[/PHP]
Second, to "delete" a variable, you can use the unset function. This essentially destroys the variable.
[PHP]<?php unset($var1, $var2, $var3); ?>[/PHP]
Hope this helps.