Page 1 of 1

Function inside function?

Posted: Wed Jan 14, 2009 10:10 am
by popokolok
Hello, I have this code:

Code: Select all

$lol=file_get_contents('http://www.website.com/something/print $page;');
 
print $lol;
$page should fetch a random filename from an array defined earlier in the code whenever the page is refreshed, to complete the url for file_get_contents. For example: http://www.website.com/something/spoon.html

How can I make the print function to work inside the file_get_contents as shown above? Do I need to escape some characters or something?

Thanks in advance!

Re: Function inside function?

Posted: Wed Jan 14, 2009 2:29 pm
by kendall
try

Code: Select all

file_get_contents('http://www.website.com/something/print '.$page);