crazylegseddie Posted April 12, 2006 Share Posted April 12, 2006 hey simple question. I use this to print out a specific row from my database shown below:<?phprequire '../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); print_r($row); ?>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 dataThank you whoever can help me with this?? Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 12, 2006 Share Posted April 12, 2006 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]Ken Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.