Advertisement

06.03.2008 at 06:10PM PDT, ID: 23455270
[x]
Attachment Details

How to Limit Echoed Text to 1 Value

Asked by macrolific in PHP and Databases, PHP Scripting Language, MySQL

Tags: PHP, MySQL

The PHP script below echoes 48 lines of key/value pairs.  Line 9 reads as follows:

     x_invoice_num : 1212541023

The only thing I want this script to do is echo the value for 'x_invoice_num', which in this example is '1212541023'.

I'm sure anyone who's half descent in PHP will know how to do this; I can't quite figure it out.

How do I get this script to echo only the value for  'x_invoice_num'  ?  Thanks.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
<?php
include_once('./db.inc.php');
include_once('./lib.inc.php');
include_once('./phpauthnet_aim.php');
 
//CHECK MD5 HASH VALUE
if($authnet['md5hash'] != "") {
	if($authnet_results['md5'] != $authnet_results['x_md5_hash']) {
		$authnet_results['x_response_code']='3';$authnet_results['x_response_reason_text']='MD5 HASH mis-match'; 
		}
  }
 
	foreach ($authnet_results as $key=>$value)
	{
		echo "$key : $value<br />";
	}
 
}
?>
[+][-]06.03.2008 at 06:14PM PDT, ID: 21705961

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: PHP and Databases, PHP Scripting Language, MySQL
Tags: PHP, MySQL
Sign Up Now!
Solution Provided By: glcummins
Participating Experts: 3
Solution Grade: A
 
 
[+][-]06.03.2008 at 06:16PM PDT, ID: 21705968

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 06:16PM PDT, ID: 21705970

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 06:19PM PDT, ID: 21705980

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628