Jump to content


This topic is now archived and is closed to further replies.


How not to print the array?

Recommended Posts

hey simple question. I use this to print out a specific row from my database shown below:

require '../library/config.php';
$result = mysql_query('SELECT pd_more FROM tbl_product WHERE pd_id = ' . $_GET['pd_id']) or exit(mysql_error());
$row = mysql_fetch_assoc($result);

But when it prints the information it includes this: Array ( [pd_more] => This is test data ). How do i change the script so it only prints the text: This is test data

Thank you whoever can help me with this??

Share this post

Link to post
Share on other sites
That's what the print_r() function does, it dumps the array and the variable $row is an array. To just pring the value, do
[code]<?php echo $row['pd_more']; ?>[/code]


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.