Basically what I'm trying to do is load all the emails that are in a database and insert them into an array. But since printf
outputs in length of the string I have no clue how to do it. I know this is probably something very basic but, yeah. I'm kindof new to php. Any idea's?
<?php
$emails = array();
mysql_connect("127.0.0.1", "root") or
die("Could not connect: " . mysql_error());
mysql_select_db("users");
$result = mysql_query("SELECT email FROM users");
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$email = printf("%s", $row[0], $row[1]);
}
mysql_free_result($result);
?>