paymentstv Posted October 28, 2011 Share Posted October 28, 2011 Hello All, I have two php files original.php and return.php retrun.php file returns a variable after I pass $channel_name to it return $return_variable; I want to assign this return variable to a variable in original.php Something like this $results = include ('return.php?channel='.$channel_name.''); I am not sure how to do the above code. When I call the return.php from a browser it works properly. Thanks for any help Quote Link to comment https://forums.phpfreaks.com/topic/249955-assign-a-return-value-of-a-php-file-to-a-variable/ Share on other sites More sharing options...
MasterACE14 Posted October 28, 2011 Share Posted October 28, 2011 if you include('return.php') , $channel_name should be accessible from the page it's included in. Therefore you wouldn't need to append it to the URL which simply isn't done with the include function. Quote Link to comment https://forums.phpfreaks.com/topic/249955-assign-a-return-value-of-a-php-file-to-a-variable/#findComment-1282906 Share on other sites More sharing options...
paymentstv Posted October 28, 2011 Author Share Posted October 28, 2011 Thanks this worked. Quote Link to comment https://forums.phpfreaks.com/topic/249955-assign-a-return-value-of-a-php-file-to-a-variable/#findComment-1282914 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.