1

sorry for being vague but I have a PHP script which extracts data from a database and displays it, however instead of outputting the contents of the database it outputs 'Array' the number of times their are results.

(Couldn't get the to work again, script uploaded here), the script's output is also here.) Thanks :-)

4 Answers 4

2

Use print_r($array); or var_dump($array); to see

Sign up to request clarification or add additional context in comments.

Comments

1

$row is an array, in contains all record fields. Use

echo $rows['unique_id'];

instead.

And don't use mysql extension

Comments

1

Have you tried printr or var_dump?

You need to specify the column or value in the array to echo.

echo $rows[unique_id];

Comments

0

As the name implies, mysql_fetch_array() returns an array. You probably want:

 echo $rows['unique_id'];

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.