Re: how can i pass a value to an included file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





u r right, .....basics ..

thanks a lot . pete


Thanks,

     Reji,
     PHP Developer.




--- On Thu, 28/8/08, Pete <cgrp@xxxxxxxxxxxx> wrote:
From: Pete <cgrp@xxxxxxxxxxxx>
Subject: Re:  how can i pass a value to an included file
To: php-objects@xxxxxxxxxxxxxxx
Date: Thursday, 28 August, 2008, 3:37 AM










    
            In message <805874.29355. qm@web25401. mail.ukl. yahoo.com>, Reji Jayan

<for_rejijayan@ yahoo.co. uk> writes

>

>Hello all,

>

>i am having a doubt ... 

>

>

>actually im strucked here 

>

>

>how can i pass a value to an included file??

>

>

>its like this

>

>

>include "abc.php?value= $xyz";



You don't need to pass the value.

include "abc.php"

is sufficient.



If abc.php contains the function doit(), then in the main file, just

call doit($myvariable) as though it were in the main file.



If abc.php has code which is not in a function, it will be able to "see"

the variables in the main file.



Think of it like this. Imagine that you take abc.php, and cut and paste

it into your main file, as you would in Word, or an editor.  That is the

way that it behaves. 



-- 

Pete Clark



Sunny Andalucia

http://hotcosta. com/Andalucia. Spain


      

    
    
	
	 
	
	








	


	
	


      Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux