如何打印从文本文件或数据库中获取的密钥。

问题描述:

嘿,





基本上。我想要回显或打印键。



包含键的文本文件(或数据库)示例:

KEY1

KEY2

KEY3

KEY4

KEY5

KEY6

KEY6



我想要做的是按下按钮时回显或打印一个键。



所以我按下按钮然后它回复KEY1然后我再次按下按钮它回复KEY2等。



如何使用php制作这个?



我不介意将密钥存储在数据库中而不是文件中。



谢谢。



我尝试了什么:



我尝试了一些我在互联网上找到的解决方案,没有这就是我想要他们悲伤的方式。

Hey,


Basically. I want to echo or print keys.

Example of text file (or database) containing keys:
KEY1
KEY2
KEY3
KEY4
KEY5
KEY6
KEY6

What I want to do is echo or print one key at a time when a button is pressed.

So I press button and it echos KEY1 then i press button again and it echos KEY2, etc.

How can I make this using php?

I don't mind storing the keys in a database either rather than a file.

Thanks.

What I have tried:

I have tried some solutions I found on internet, none that worked the way I wanted them to sadly.

你的问题不明确,但以下内容会对你想要的东西有所帮助。
Your question is not clear, but the following will go some way to what you want.
<?php
    


start = 1 ;
start = 1;


max = 5 ;
for(
max = 5; for(