Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 838057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:14:32+00:00 2026-05-15T05:14:32+00:00

Is it possible to include a file that contains a string value (in this

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T05:14:32+00:00Added an answer on May 15, 2026 at 5:14 am

    Does include.php have to be a PHP file?

    If not, make it an ordinary text file (eliminating the <?php and ?> tags), and use:

    test(file_get_contents('include.txt'));
    

    That will just read the contents of include.txt as a string, and of course you can then do whatever you’d like.

    Otherwise, using include actually executes the PHP in the file, so you could make include.php contain:

    $variable = 'value1,value2,value3';
    

    And then use:

    include('include.php');
    test($variable);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 537k
  • Answers 537k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In your datagrid, each column has a sortexpression. If you… May 17, 2026 at 1:42 am
  • Editorial Team
    Editorial Team added an answer Take any big project for an example: If it does… May 17, 2026 at 1:42 am
  • Editorial Team
    Editorial Team added an answer You need to get the JSON library from here (you… May 17, 2026 at 1:41 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Let's say I have a tab-delimited text file that contains data arranged in columns
I've done this using a regular .cs file that just extends System.Web.UI.UserControl and then
I've created a php file called pagebase.php that I'm quite proud of. It contains
I have a jsf page that contains some javascript includes. And I want to
Here's a standard scenario: if(string.IsNullOrEmpty(Configuration.AppSettings[foobar])) throw new SomeStandardException(Application not configured correctly, bozo.); The problem
I have a text file which was created using some Microsoft reporting tool. The
Possible Duplicate: Storing echoed strings in a variable in PHP Suppose I have <?php
Is there a way for GCC to produce a warning while linking libraries that
I have a web application that I am hosting, and a client of mine
So i have the misfortune of embedding this proprietary ActiveX control we created into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.