Jump to content

Archived

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

casperpaul

[SOLVED] Simple PHP Questions

Recommended Posts

I am trying to extract info from db but it keeps returning "Array".  My code is below, any help will be appreciated.

  $conn = db_connect();
  $query = "select first_name from users where email='$email'";
  $result = mysql_query($query);

  $result = mysql_fetch_array($result);
  return $result;
 
Always returns "Array".

Share this post


Link to post
Share on other sites
[code]  $conn = db_connect();
  $query = "select first_name from users where email='$email'";
  $result = mysql_query($query);
  $row = mysql_fetch_array($result);
  echo $row[first_name];
[/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.