0

Hey all i am trying to figure out a way to see what all values are within the array:

  $sql = "select * from product where type = ? limit 1";
$query = self::$__CONN__->prepare($sql);
$query->execute(array($type)) or die(print_r($query->errorinfo()));

I am new at PHP and im not sure what all that is doing to populate the query string. I am guessing that the first query is connecting to the server and sending out the query but how do i see what its returning back in the array above?

Any help would be great!

2
  • What is $type supposed to be? Commented Jul 31, 2012 at 19:19
  • You mean you want to assign the result to an array and echo the values? Commented Jul 31, 2012 at 19:21

1 Answer 1

1

Just dump the $type variable

var_dump($type);

Or if you are interested in the array wrapper itself

var_dump(array($type));
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.