We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,031 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

View this value inside this array (or double array)?

Hey

I have this code........

/*MORE THINGS ABOVE*/
<?php foreach ($_options as $_option) : ?>
            <?php print_r($_option);?>
            /*MORE THINGS BELOW*/

That print_r gives me this (the first time around, other times its the same but it just gives me different Xs and Ys which is expected):

Array ( [label] => Corte [value] => X: 207 Y: 339 Type: spline#X: 287 Y: 148 Type: spline#X: 453 Y: 170 Type: spline#X: 474 Y: 354 Type: spline#X: 359 Y: 466 Type: spline#X: 270 Y: 436 Type: spline#X: 207 Y: 339 Type: spline# [print_value] => X: 207 Y: 339 Type: spline#X: 287 Y: 148 Type: spline#X: 453 Y: 170 Type: spline#X: 474 Y: 354 Type: spline#X: 359 Y: 466 Type: spline#X: 270 Y: 436 Type: spline#X: 207 Y: 339 Type: spline# [option_id] => 2 [option_type] => area [custom_view] => )

I want to get and retrieve (or print/echo it out) ONLY what is in Corte[value]. How can I retrieve that? I also want to get [option_id] but I imagine if I can get Corte[value] I can problably get [option_id]

How can I do it?

Thanks!

1
Contributor
2
Replies
3 Hours
Discussion Span
11 Months Ago
Last Updated
3
Views
Question
Answered
riahc3
 
Team Colleague
1,300 posts since May 2008
Reputation Points: 62
Solved Threads: 13
Skill Endorsements: 11

Like I mentioned option_id is what I expected:

<?php echo($_option['option_id']);?>

That works. But

<?php echo($_option['Corte']['value']);?>

Doesnt.....

riahc3
 
Team Colleague
1,300 posts since May 2008
Reputation Points: 62
Solved Threads: 13
Skill Endorsements: 11

Solved it. It was a problem between the chair and the keyboard.

riahc3
 
Team Colleague
1,300 posts since May 2008
Reputation Points: 62
Solved Threads: 13
Skill Endorsements: 11
Question Self-Answered as of 11 Months Ago

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.2924 seconds using 2.68MB