HTML PHP .txt file as array & then install in Listenelemt?

Hi first I have the following problem:

I have a .txt file that looks as following:

Peterhans Mark Luke

and would like the section in this Html installing (so that the name on every page request from the new .txt load):

  • name 1
  • name 2
  • name 3
  • name 4

is there an easy way as "

  • $ Array [0]
  • "?

Thank you in advance ;)

The best answer

probiers times

$namen = file_get_contents("namen.txt");
$teile = explode(" ", $namen);

echo "<ul class=\"member\">";
echo "<li>" . $teile[0] . "</li>";
echo "<li>" . $teile[1] . "</li>";
echo "<li>" . $teile[2] . "</li>";
echo "<li>" . $teile[3] . "</li>";
echo "</ul>";

unfortunately do not know how I can edit my question!

the html part course looks like this:

<ul class="member">
<li>Name 1</li>
<li>Name 2</li>
<li>Name 3</li>
<li>Name 4</li>
</ul><br clear="all" />

Date: 2018-07-19 Views: 1

Related articles

  • How do I load a .txt file fx9860g in my Casio? 2013-10-11

    Hello. I already have applications to read from .txt files on my calculator installed. How do I spelled on computer .txt file now in the calculator load so I can open it with the application and read? When I try to import them into FA-124 is the mess

  • Read in HTML text from .txt file in Label 2019-11-12

    Hey guys, I had a small problem. I am currently still beginner what "programming" is concerned. My question: I have a text document with 200-Chuck Norris jokes. Now I always want one of these jokes via a button in a Label Show Let. How do I real

  • PHP search and replace in txt file 2013-09-20

    Hi first! Unfortunately, I'm not here on. My website is almost finished and I only have a few small problems, which can not be so easily solved. I would to support very grateful. My text file: Tester1 | sgrth3zjtklhllp | No | testname1 | testnachname

  • With HTML Button write to TXT file on FTP ?! 2017-07-15

    Hello, and specifically my question is whether it is possible that I (ie when clicking the buttons) can describe my txt file to my FTP server with an HTML button.?! Asking for an answer, thank you !! :-) --answer-- Hello GigsRam, HTML and JavaScript

  • How to add photos into a html / php file? 2012-04-09

    Hello, I have a question about computer science. We need to create a website and have learned with the following command to insert the images: We also have learned something about relative and absolute references, I must again note something? The res

  • Activate game on Steam and then install the files with CD? 2013-09-05

    Hi, it's possible that I activate a game on Steam and the files then downloading not from Steam but from the CD? I have about my bad internet namely not the way that I could just download so big games, so I would have to do so via the CD. With Steam

  • Can you copy the files to an installation CD such as Far Cry 4 on the desktop and then install without cd? 2013-09-26

    --answer-- Sure you need the program UltraISO so you can datein of the cd copy on desktop Depends on the CDs / DVDs on it like they were set up. Some that goes you can then install it. Play without DVD but ehr difficult. It is simpler because, it is

  • Computer Help! have only .TXT files it can not open my .exe but! 2012-03-27

    Help! I have only .txt (I believe (that Editor files)) on the desktop and I do not know how I should modify in .exe! I have a program once can not open and then I accidentally went up there, the one opens with the Editor. How can I modify the that op

  • Insert complex txt file at certain points terms via form? 2013-01-24

    Hello I have a text file which is quite long and is approximately the following structure: $ Lang [ 'langding_subtitle'] = 'Leave room'; $ Lang [ 'langding_beschreibung'] = 'Description'; $ Lang [ 'langding_impressum'] = 'Contacts'; $ Lang [ 'langdin



Copyright (C) 2019, All Rights Reserved.

M3tch all rights reserved.

processed in 0.989 (s). 10 q(s)