Jump to content

How do I include PHP code inside of PHP code!!


OM2

Recommended Posts

Can someone tell me if it's possible to include PHP code inside of PHP code!!!?

 

I've got a HTML where I have written lots of PHP code

 

I have functions calls and some includes of other PHP files

 

Now... I now need to split up the code so that it's much more well organised

 

Let's say I have:

 

<br>
<?php functionCall(); ?>
<br>
<br>
<?php include("myFile"); ?>
<br>

 

Now I want to stick all of the above inside of a new PHP file called: myFile.php

 

And in place of the above code, I will have:

 

<?php include("myFile.php"); ?>

 

How can I do this!!!?

 

Thanks

 

 

OM

there's a reason for everything in life :)

its close to midnight...

still in the office

need to do some coding to show a client the next day

suddenly discover that i can't do what i had planned  :(

haven't eaten all day and not thinking straight  ::)

 

in the end i realised my madness

it didn't make sense that you could have php inside of php - but i thought i'd ask anyway  :o

 

in the end, i figured it out :)

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.