Is there a code to just use the source from another page without including it? For ex: mypage.php has some codes I want to put on mainpage.php. Is there a code for me to use on mainpage.php to get the codes from mypage.php without including mypage.php?
I tried include but I get the whole page. All I want is to be able to type $variable on mainpage.php and it'll refer to whatever variable is on mypage.php.