Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.