-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtext.php
More file actions
49 lines (38 loc) · 1.04 KB
/
text.php
File metadata and controls
49 lines (38 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
include ("connection.php");
//header("Access-Control-Allow-Origin: *");
//header("Content-Type: application/json; charset=UTF-8");
// Create connection
$conn = connection::connect();
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql="SELECT *
FROM array ";
if ($result = $conn->query($sql)){
// while($row = $result->fetch_assoc()) {
// foreach ($result as $row){
//require 'PHPMailer/PHPMailerAutoload.php';
$name = new ArrayIterator(array());
$age = new ArrayIterator(array());
$country = new ArrayIterator(array());
$team = new ArrayIterator(array());
$it = new MultipleIterator;
$it->attachIterator($name);
$it->attachIterator($age);
$it->attachIterator($country);
$it->attachIterator($team);
while($row = $result->fetch_assoc())
{
$name[] = $row["name"];
$age[] = $row["age"];
$country[] = $row["country"];
$team[] = $row["team"];
}
foreach($it as $e) {
echo $e[0];
echo $e[1];
echo $e[2];
echo $e[3];
}
}