views:

72

answers:

2

I it possible to include two times a page called walkin in a page makeit.php

A: 

It depends. PHP's include() acts like a copy and paste, so your question is equivalent to "Can we copy and paste 'TheWalkin.php' two times in a PHP page?

If there are no function or class definitions in TheWalkin.php, yes.

EDIT: Maybe you want to look at this: include_once. It makes sure you are only include a file once.

quantumSoup
+1  A: 

Yes.

But the code will be executed twice.

If you only want it to be included once, use the aptly named include_once.

Problems may occur if you define functions or classes or connections twice. Why do you want to include twice?

Thomas O