print_r not working just prints "1"?

OK I have a script that is running like a web service.

I am trying to figure out way an array is set to, but since I am not accessing the page directly it is being accessed by another script I am emailing the array to myself to see what it is.

but it is always just saying 1

I even tried this:

$test = array();
  $test[0] = 2;
  $test[1] = 5;
  $test[2] = 7;
  mail('my_email_address@gmail.com','test','Email testz :'.print_r($test));

But this is what I get:
Email testz :1

Doesn’t make since to me…anyone got a clue?

Thanks!!

I am an idiot I need to pass true as the second param.

print_r prints what you’re looking for. It does not necessarily return it.

www.php.net/print_r

Edit:

Take a look at the second parameter, actually.