HELP: call other php script inside the php file?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mapperkids
Forum Newbie
Posts: 15
Joined: Mon Feb 11, 2008 8:53 pm

HELP: call other php script inside the php file?

Post by mapperkids »

Hi,

I want to know the synax of how to call/execute other php inside the php file

Here is what i want to do.

$i=1
While ( $i <=100);}

$var= "test"
call script1.php
call script2.php

$i++;

}

So both script1.php and script2.php should run 100 times and also every will pass the value in $var to the script1 and script2.

Thanks!
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: HELP: call other php script inside the php file?

Post by josh »

include
saran_tvmalai
Forum Newbie
Posts: 5
Joined: Fri Sep 19, 2008 7:42 am

Re: HELP: call other php script inside the php file?

Post by saran_tvmalai »

USE the include

include ('script1.php');
include ('script2.php');
mapperkids
Forum Newbie
Posts: 15
Joined: Mon Feb 11, 2008 8:53 pm

Re: HELP: call other php script inside the php file?

Post by mapperkids »

saran_tvmalai wrote:USE the include

include ('script1.php');
include ('script2.php');
Thanks, it works!!
Post Reply