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

  • SEARCH
  • Home
  • 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 8545043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:42:00+00:00 2026-06-11T12:42:00+00:00

Below is my string called $output it is derived from and fsockopen and fread.

  • 0

Below is my string called $output it is derived from and fsockopen and fread. The only thing that might be able to be changed is the fread but nothing else before this.

14336.0 K9IA 13-Aug-2012 1750Z washington, dc (throb) 
14336.0 K9IA 13-Aug-2012 1750Z fond du lac, wi (ssb) 
14336.0 K9IA 13-Aug-2012 1752Z calumet, wi (ssb) 
14336.0 K9IA 13-Aug-2012 1752Z carsen city, nv (ssb) 
14336.0 K9IA 13-Aug-2012 1753Z carson city, nv (ssb) 
14336.0 K9IA 13-Aug-2012 1754Z dane, wi (ssb) 
14336.0 K9IA 13-Aug-2012 1759Z dane, wi (cw) 
14336.0 KA2TED 13-Aug-2012 1759Z Carson City,NV(SSB) 
14336.0 K9IA 13-Aug-2012 1800Z dane, wi (psk) 
14336.0 K9IA 13-Aug-2012 1801Z bristol, va (psk) 
14336.0 K9IA 13-Aug-2012 1815Z caeson city, nv (rtty) 
14336.0 K9IA 13-Aug-2012 1816Z carson city, nv (rtty)

I then take the string $output and do the following:

$output = str_replace("\n", "<br>", $output);

This inserts a line feed after the closing bracket ) and forms 12 lines. Perfect so far.

What I need to do is take the $output now and be able to display it in a nicely formatted table.

What I mean is……

Each is a field, as in an array…. I would like to use the same format as if it was an MySql data as in:

    while($row = mysqli_fetch_array($result))
    echo $row['Freq'];
    echo "</td><td>";
    echo $row['Call'];
    echo "</td><td>";
    echo $row['Date'];
    echo "</td><td>"; 
    echo $row['Time'];
    echo "</td><td>";
    echo $row['CTYState'];
    echo "</td><td>";
    echo $row['Mode'];
    echo "</td><td>";

Reason for each to be separate is I need to preform other functions such as links etc with a given field. I have searched, tried, frustrated and know there must be a way. I have done this over and over again in VB and PHP either using MySQL or odbc_connect but never with a string.

UPDATE….

I use the method Ed Manot posted because I will be able to use the fields for links, different colors etc……..

BUT……….

It does not really work well. I can only see the first 2 fields. The fields I can see are Field 1 and Field 3 only. Using your original code I can only see 1 14336.0 and nothing else. Any ideas?

echo "<table border='1'>";
echo"<tr><th>FieldA</th><th>FiledB</th><th>FiledC</th><th>FieldD</th><th>FieldE</th>    <th>FiledF</th><th>FiledG</th></tr>\n";
//split the output into lines based on the line break character
$lines = explode("\n", $output);
foreach($lines as $line) {
//split the line into fields based on the space character
 $fields = explode(" ", $line);
 echo "<td>" .$fields[0]. "</td>";
 echo "<td>" .$fields[1]. "</td>";
 echo "<td>" .$fields[2]. "</td>";
 echo "<td>" .$fields[3]. "</td>";
 echo "<td>" .$fields[4]. "</td>";
 echo "<td>" .$fields[5]. "</td>";
 echo "<td>" .$fields[6]. "</td>";
 echo "<td>" .$fields[7]. "</td>";

}
echo '</table>';
  • 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-06-11T12:42:01+00:00Added an answer on June 11, 2026 at 12:42 pm

    I figured out the problem. Instead of spaces, carrots ^ were used. They showed up as spaces but were not. Used Regex to replace ^ with ” “. Works now.

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

Sidebar

Related Questions

I have a Runnable that reads Console output from an externally called exe (see
I have below string String str=select * from m_menus; select * from m_roles; I
Consider the below String String names = Bharath-Vinayak-Harish-Punith I want to get output in
I have the code below: string SQL = select * from + TableName; using
Possible Duplicate: Why has the destructor been called only once? Given the code below,
In the code below, I've added two lines that print output. The first line
Below you will see a picture of beatiful pastry called simit from Turkey. It
My code is as below: String[] columns = {ContactsContract.Contacts._ID, ContactsContract.Contacts.DISPLAY_NAME, ContactsContract.Contacts.HAS_PHONE_NUMBER}; Cursor cursor =
i have an array below string stringArray = new stringArray[12]; stringArray[0] = 0,1; stringArray[1]
I have the below String assignment statement String items[] = line.split(\,\,15); String fileNamet =

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.