Include PHP file content as argument to function that expects string value?
Posted
by letseatfood
on Stack Overflow
See other posts from Stack Overflow
or by letseatfood
Published on 2010-06-06T16:27:57Z
Indexed on
2010/06/06
16:32 UTC
Read the original article
Hit count: 204
Is it possible to include a file that contains a string value (in this case a comma delimited list of values) as an argument to a function?
For example:
include.php
<?php
'value1,value2,value3'
?>
function.php
<?php
function test($string)
{
echo $string;
}
test(include 'include.php');
?>
I've tried this and it doesn't work, but is there a way to do what I am trying?
Thanks!
© Stack Overflow or respective owner