Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey

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



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!
 
Koldo Urrutia
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like I mentioned option_id is what I expected:



That works. But



Doesnt....
 
Koldo Urrutia
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved it. It was a problem between the chair and the keyboard.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest way to retrieve is

<?php print_r($_options['value']);?>
 
keep an eye out for scorpions and black widows. But the tiny ads are safe.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic