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 6842353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:05:23+00:00 2026-05-27T00:05:23+00:00

EDIT: I call the function writecol() further down the page inside <table></table> tags. Example

  • 0

EDIT: I call the function writecol() further down the page inside <table></table> tags.

Example of data in trxtt.txt:

South East asia,2222,code1

winter break,3333,code2

I am fairly new to php. I am trying to dynamically build table rows based off the variables read from an array. When I call this function I do not receive and error message, but nothing happens. Any ideas what I am doing wrong?

$x = file_get_contents('textt.txt');
$y = explode("\r\n", $x);

function writecol(){
    foreach ($y as $value) {
        $z = explode(",", $value);
        echo "<tr class='visible'><td class='underlinecenter'>" . $z[0] . "</td> <td></td> <td colspan='3' class='underlinecenter'>" . $z[1] . "</td><td></td><td colspan='3' class='underlinecenter'>" . $z[2] . "</td></tr>";
    }   
}
  • 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-27T00:05:24+00:00Added an answer on May 27, 2026 at 12:05 am

    You don’t appear to be calling the function, nor is your function ready to receive the variable with data.

    after $y = explode…. insert:
    writecol($y);

    Then replace function writecol(){ with

    function writecol($y){

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to call a function that appends html tags inside of pre-existing
EDIT 11/3/2011 9:37pm: This is my error: error: no matching function for call to
In file1.js inside a function I need to call a function which is actually
I'm attempting to call a function inside of a lua file called test2.lua This
EDIT: Problem solved by using $i+1 in function call. I have trouble using variables
EDIT: Apparently, the problem is in the read function: I checked the data in
EDIT 2: Confirmed that my performance problems were due to the static function call
i have a question about the function call in the following example: int main()
I was looking for a way to call the edit method directly. - (void)tableView:(UITableView
Can I intercept a method call in Objective-C? How? Edit: Mark Powell 's answer

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.