I've read on this forum some stuff about this and this is my PHP code:
<?
$percorso = file("emma.txt");
while(list(,$value) = each($percorso)){
list($aboutme, $aboutme2) = split("[:]", $value);
#declaration trim()
$params["aboutme"] = trim($aboutme);
$params["aboutme2"] = trim($aboutme2);
#print results
//put aboutme in label
//put aboutme2 in label2
}
?>
Basically: I have a text file (emma.txt
) that has some infos inside separated by a new line. Here you can see an eaxpmle:
data_1
data_2
data_3...
With that code I read the content of each single line and I'd like put the content into a label, but I don't know how to do it. This is the label: <label name="lbl1">Nickname</label>
.
I was thinking to use the $_GET[]
method, because I want set the labels' text with those text file lines. What can I do??