Jump to content

Recommended Posts

I did a query in my index.php and my results can be seen when i put in a different .php and include it hahaha epic..

 

so like

 

in my index.php i got results from table {$data['id']} and i use include 'profile.php' then i put {$data['id']} in my profile.php at very top and it WORKS HAAA

 

This is epic is there any other stuff i can do ?

 

This is will help so much, now my 5000 line index.php can become cleaner! hahaha

Link to comment
https://forums.phpfreaks.com/topic/184941-i-didnt-know-we-could-do-this/
Share on other sites

From the include() page of the php manual -

When a file is included, the code it contains inherits the variable scope of the line on which the include occurs. Any variables available at that line in the calling file will be available within the called file, from that point forward.

From the include() page of the php manual -

When a file is included, the code it contains inherits the variable scope of the line on which the include occurs. Any variables available at that line in the calling file will be available within the called file, from that point forward.

 

HAha awesome bro thanks this is great help ty

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.