RE: Is it possible for part of a page to be a php include ?

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

 



Many thanks for the input on this to Brian and
Robert - it's definitely appreciated.

I don't understand functions, and I apologise now
if I sound a tad slow on this, but I've only been
using a php a few weeks ;-(

For example:

The page that the php include is to *go into* is
examplewebsite-a/page1

One of the tables on
anotherexamplewebsite-b/tables is the table to go
into the above page.

On both pages, there's quite a few tables and all
html with no php codes anywhere.

How do I tell examplewebsite-a/page1 which table
on examplewebsite-b/tables to include please?

Any help appreciated.

Chris

 

> -----Original Message-----
> From: php-objects@xxxxxxxxxxxxxxx 
> [mailto:php-objects@xxxxxxxxxxxxxxx] On Behalf
Of Brian Etheridge
> Sent: Tuesday, April 04, 2006 2:08 PM
> To: 'php-objects@xxxxxxxxxxxxxxx'
> Subject: RE:  Is it possible for
part of a page 
> to be a php include ?
> 
> Hi Chris,
> Again, this is no problem.  The included file is
PHP code so you can
> surround your conditional bits with PHP:
> 
> You can 'step' into and out of PHP using the '<?
... ?>' 
> tags.  Whilst in
> between the tags you are PHP and outside the
tags you are 
> HTML.  So your
> page becomes a series of HTML/PHP/HTML/PHP/etc:
> 
> 
> 	<?
> 		// If we are on the home page then
do something special.
> 		if ($currentPageName == HOME){
> 	?>
> 			<div>Welcome to the Home
Page</div>
> 	
> 	<? else{ ?>
> 			<div>Welcome to some other
page</div>
> 	<? } ?>
> 
> What actually happens is that all the code
becomes PHP.  So 
> you can think of
> the above snippet as being equivalent to:
> 
> 
> 	<?
> 		// If we are on the home page then
do something special.
> 		if ($currentPageName == HOME){
> 			print('<div>Welcome to the
Home Page</div>');
> 		else{
> 			print('<div>Welcome to
some other page</div>');
> 		}
> 	?>
> 
> The variable $currentPageName must have been
defined before 
> this point in
> the code, either in this included file or
available in the 
> context in which
> the file is included.  
> 
> Continue this thread if you have any further
questions.
> 
> Brian
> 
> -----Original Message-----
> From: Chris [mailto:Chris@xxxxxxxxxx] 
> Sent: 04 April 2006 12:57
> To: php-objects@xxxxxxxxxxxxxxx
> Subject: RE:  Is it possible for
part of a page 
> to be a php
> include ?
> 
> Hi Brian,
> 
> Many thanks for the input.
> 
> The page where the includes go *into* is no
problem, but is 
> there any way
> that on the page where it's coming *from* that
it can just 
> get a part of
> *that* page please?
> 
> I.e. on the page that the php include is coming
*from*, 
> there's stacks of
> html including a few tables, but I would like
just one of 
> those tables to be
> included on another page on another website.
> 
> Any help appreciated.
> 
> Chris. 





PHP Data object relational mapping generator
http://www.metastorage.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



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

  Powered by Linux