SDJ SDJ - 5 months ago 7
PHP Question

How to pull in an array to a PHP MySQL output?

I am trying to pull in this date for each part of my database, but I am missing some element to make it work and not sure what I am missing?

$modified[] = array(date("m/d/y", strtotime($row[audit_modify_date]))."<br />".date("g:i a", strtotime($row[audit_modify_date])),);

//query
for ($i=0; $i < count($result); $i++) {
echo "<tr>";
echo "<td>$modified</td>";
echo"<tr>";
}


They output just says Array.

Answer

You are printing the array, not the elements in the array

echo "<td>$modified</td>";

either

for ($i=0; $i < count($result); $i++) {
    echo "<tr>";
    echo "<td>".$modified[$i]."</td>";
    echo"<tr>";
} 

or

foreach ($modified as $m) {
    echo $m;
}

edit actually what? I don't understand what you're doing