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?? Link to comment https://forums.phpfreaks.com/topic/7241-how-not-to-print-the-array/ 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 Link to comment https://forums.phpfreaks.com/topic/7241-how-not-to-print-the-array/#findComment-26349 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.