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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:16:50+00:00 2026-06-03T09:16:50+00:00

have a help file which i have created in Notepad++ with the following syntax

  • 0

have a help file which i have created in Notepad++
with the following syntax

//Filename:PHP_Help.html

<!-- Heading of the Issue/Solution

// it may contain PHP Code or Mysql Queries or General Description
<?php

    // Code that fixed the issue/ Solution to a problem
?>

Some general Description
-->

I used the above format because in Notepad++ if i press
“ALT + 0”

it display as

<!-- Heading of issue 1
<!-- Heading of issue 2

so that it helps in finding a solution to a problem reading the heading.
But the help file has increased in size and contains hundreds of issues

So i am trying to load the file to database and use PHP to search for the issues/solutions

My Database Schema would be like

Create table issues
(
 id int auto_increment primary key,
 header nvarchar(100),
 content text
);

My Question is how do i load the particular file to database?

  • 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-03T09:16:51+00:00Added an answer on June 3, 2026 at 9:16 am
    // Read the file into a php variable:
    $filecontents = file_get_contents ("PHP_Help.html");
    
    // explode the string into individual records:
    $records = explode ( "<!--" , $filecontents );
    
    // work through the array of records:
    foreach($records as $record) {
        // find your first linefeed
        $headingend = strpos($record, chr(13) );
        // get the heading
        $heading = substr($record, 0, $headingend);
        // and the content
        $content = substr($record, $headingend);
        // write to the database...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

can anyone help? I have a simple html file which i am filling via
Please can someone help? I have the following code which uploads a file to
I have one JSON file like following: {entries:[{title:‘foo’,id:‘01’,created:‘2010-12-06’},{title:‘bar’,id:‘02’,created:‘2010-12-05’}]} And also I have one html
I have downloaded several new plugins which come with a help file. None of
I have been using Sandcastle Help File Builder to produce help files (HTML 1.0)
Please help with the following: I have an input file that is quite heterogeneous
I have a binary file which was created by a VBA file (I don't
I have a function which opens up the help file for the app. The
I have created a class file database.php which handles all the sql queries and
I have a text file which was created using some Microsoft reporting tool. The

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.