Jump to content

Cannot Echo In My Mysql_Fetch_Array


Seancon1

Recommended Posts

I am unable to echo content in my mysql_fetch_array..

$query_sum = mysql_query("SELECT ip, cases, motherboards, cpu, video_cards, ram,
power_supply, sound_cards, storage, media_player, cpu_cooling, monitor, accessories FROM sessions WHERE ip = '$ip'") or die(mysql_error());
while($get = mysql_fetch_array( $query_sum )) {

$item1 = $get['cases'];
$item2 = $get['motherboards'];
$item3 = $get['cpu'];
$item4 = $get['video_cards'];
$item5 = $get['ram'];
$item6 = $get['power_supply'];
$item7 = $get['sound_cards'];
$item8 = $get['storage'];
$item9 = $get['media_player'];
$item10 = $get['cpu_cooling'];
$item11 = $get['monitor'];
$item12 = $get['accessories'];

$items = array("1" => "$item1", "2" => "$item2", "3" => "$item3", "4" => "$item4", "5" => "$item5",
"6" => "$item6", "7" => "$item7", "8" => "$item8", "9" => "$item9", "10" => "$item10", "11" => "$item11",
"12" => "$item12");

echo "Displaying: " . $item3;

}

 

 

echo "Displaying: " . $item3;

 

 

Does not return anything, not even the "Displaying" text is displayed. I remember being able to echo like this in the past, why not now?

Link to comment
https://forums.phpfreaks.com/topic/268921-cannot-echo-in-my-mysql_fetch_array/
Share on other sites

Archived

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

×
×
  • Create New...

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.